T
traeai
登录
返回首页
Simon Willison's Weblog

datasette-ip-rate-limit 0.1a0 发布

7.5Score

TL;DR · AI 摘要

Simon Willison 发布了 datasette-ip-rate-limit 0.1a0,用于对 Datasette 请求进行 IP 速率限制。

核心要点

  • 使用 Codex 构建可配置的速率限制插件
  • 配置示例包含 header、max_keys 和规则设置
  • 针对特定路径设置每分钟 60 次请求限制

结构提纲

按章节快速跳转。

  1. Simon Willison 发布了 datasette-ip-rate-limit 0.1a0,用于对 Datasette 请求进行 IP 速率限制。

  2. 该插件通过限制客户端 IP 的请求频率来防止网站被爬虫攻击。

  3. 提供了生产环境配置,包括 header 设置、最大键数和规则定义。

  4. 针对特定路径设置了每分钟 60 次请求的限制,并在超过限制后阻断 20 秒。

思维导图

用一张图看清主题之间的关系。

查看大纲文本(无障碍 / 无 JS 友好)
  • datasette-ip-rate-limit 0.1a0
    • 功能
      • IP 速率限制
      • 防止爬虫攻击
    • 实现方式
      • Codex 构建插件
      • 可配置规则
    • 配置示例
      • header 设置
      • 路径限制规则

金句 / Highlights

值得收藏与分享的关键句。

  • datasette.io 网站受到不良爬虫的攻击,因此我让 Codex(GPT-5.5 xhigh)构建了一个可配置的速率限制插件来阻止那些快速攻击特定区域的 IP。

    第 1 段

    ⬇︎ 下载 PNG𝕏 分享到 X
  • rules: - name: demo-databases paths: - "/global-power-plants/*" - "/legislators/*" window_seconds: 60 max_requests: 60 block_seconds: 20

    第 2 段

    ⬇︎ 下载 PNG𝕏 分享到 X
  • 发布于 2026 年 5 月 14 日凌晨 4:10

    第 3 段

    ⬇︎ 下载 PNG𝕏 分享到 X
#Datasette#速率限制
打开原文

Release: datasette-ip-rate-limit 0.1a0

[Simon Willison’s Weblog](https://simonwillison.net/)

Subscribe

Sponsored by: Datadog — Ship reliable AI faster with LLM Observability. Read the best practices guide

14th May 2026

Releasedatasette-ip-rate-limit 0.1a0— Rate limit Datasette requests by client IP address

The datasette.io site was being hammered by poorly-behaved crawlers, so I had Codex (GPT-5.5 xhigh) build a configurable rate limiting plugin to block IPs that were hammering specific areas of the site too quickly.

Here's the production configuration I'm using on that site for the new plugin:

datasette-ip-rate-limit: header: Fly-Client-IP max_keys: 10000 exempt_paths:

  • "/static/*"
  • "/-/turnstile*"

rules:

  • name: demo-databases

paths:

  • "/global-power-plants/*"
  • "/legislators/*"

window_seconds: 60 max_requests: 60 block_seconds: 20

Posted 14th May 2026 at 4:10 am

Recent articles

This is a beat by Simon Willison, posted on 14th May 2026.

rate-limiting 11datasette 1484codex 48

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe

AI 可能会生成不准确的信息,请核实重要内容

datasette-ip-rate-limit 0.1a0 发布 | Simon Willison's Weblog | traeai