T
traeai
Sign in
返回首页
Simon Willison's Weblog

Release: datasette-referrer-policy 0.1

6.2Score

TL;DR · AI Summary

Simon Willison released datasette-referrer-policy 0.1 to solve OpenStreetMap tile loading failures caused by Datasette's default 'no-referrer' policy, enabling configurable HTTP header control without breaking defaults.

Key Takeaways

  • Datasette's default Referrer-Policy: no-referrer blocks OpenStreetMap tiles; thi
  • The author used AI-assisted development to build a dedicated plugin, preserving
  • This plugin offers a lightweight, configurable solution for HTTP security header

Outline

Jump quickly between sections.

  1. Datasette 默认禁用引用策略导致 OpenStreetMap 地图瓦片无法加载。

  2. CAPTCHA 干扰 JSON 请求与 Referrer-Policy 配置冲突共同引发显示失败。

  3. 开发独立插件 datasette-referrer-policy 0.1,按需配置引用策略头。

  4. 不修改默认行为,通过插件实现向后兼容与用户可控性。

  5. 使用 Codex + GPT-5.5 辅助生成插件代码,提升小工具开发效率。

  6. 为 Datasette 生态提供轻量级安全头配置方案,增强第三方服务兼容性。

Mindmap

See how the topics connect at a glance.

查看大纲文本(无障碍 / 无 JS 友好)
  • datasette-referrer-policy 插件发布
    • 问题触发
      • Datasette 默认 no-referrer
      • OpenStreetMap 拒绝无引用请求
    • 解决方案
      • 开发独立插件
      • AI 辅助编码 (Codex + GPT-5.5)
    • 工程原则
      • 不修改默认行为
      • 渐进式兼容

Highlights

Key sentences worth saving and sharing.

  • Datasette does this by default, and I didn't want to change that default on people without warning.

    正文第3段

    ⬇︎ 下载 PNG𝕏 分享到 X
  • I had Codex + GPT-5.5 build me a new plugin to help set that header to another value.

    正文第3段

    ⬇︎ 下载 PNG𝕏 分享到 X
  • OpenStreetMap quite reasonably block tile requests from sites that use a Referrer-Policy: no-referrer header.

    正文第2段

    ⬇︎ 下载 PNG𝕏 分享到 X
#Datasette#Referrer-Policy#OpenStreetMap#HTTP#Plugin
Open original article

Release: datasette-referrer-policy 0.1

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

Subscribe

Sponsored by:MongoDB — Join MongoDB.local London 2026 on 7 May to learn how teams move AI from prototype to production.

5th May 2026

Releasedatasette-referrer-policy 0.1— Set the Referrer-Policy header for a Datasette site

The OpenStreetMap tiles on the Datasette global-power-plants demo weren't displaying correctly. This turned out to be caused by two bugs.

The first is that the CAPTCHA I added to that site a few weeks ago was triggering for the .json fetch requests used by the map plugin, and since those weren't HTML the user was not being asked to solve them. Here's the fix.

The second was that OpenStreetMap quite reasonably block tile requests from sites that use a Referrer-Policy: no-referrer header.

Datasette does this by default, and I didn't want to change that default on people without warning - so I had Codex + GPT-5.5 build me a new plugin to help set that header to another value.

Posted 5th May 2026 at 11:44 pm

Recent articles

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

http 124openstreetmap 55datasette 1480

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 may generate inaccurate information. Please verify important content.