datasette-referrer-policy 0.1
Summary
Datasette-referrer-policy 0.1 was released on May 5th, 2026, to address issues with OpenStreetMap tiles not displaying on the Datasette global-power-plants demo site. The problem stemmed from two bugs: first, a CAPTCHA previously added to the site was incorrectly triggering for `.json` fetch requests from the map plugin, which users could not solve as these were not HTML requests. Second, OpenStreetMap blocks tile requests from sites employing a `Referrer-Policy: no-referrer` header, which Datasette uses by default. The new plugin allows Datasette users to modify this default referrer policy, ensuring proper display of OpenStreetMap tiles.
Key takeaway
For DevOps Engineers managing Datasette deployments that integrate external mapping services like OpenStreetMap, you should evaluate your site's `Referrer-Policy` header. Implement datasette-referrer-policy 0.1 to explicitly set a less restrictive policy, preventing issues where external content providers block requests due to a `no-referrer` default. This ensures proper rendering of map tiles and other third-party assets.
Key insights
A new Datasette plugin enables custom Referrer-Policy headers to resolve external content display issues.
Principles
- Default security policies can impact third-party content integration.
- Non-HTML requests require careful CAPTCHA implementation.
Method
A new Datasette plugin was developed using Codex + GPT-5.5 to allow users to set the `Referrer-Policy` header to a value other than the default `no-referrer`.
In practice
- Install datasette-referrer-policy to configure referrer headers.
- Review CAPTCHA logic for non-browser-initiated requests.
Topics
- datasette-referrer-policy
- Referrer-Policy Header
- Datasette Platform
- OpenStreetMap Integration
- CAPTCHA Bypass
Code references
Best for: Software Engineer, DevOps Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Simon Willison's Weblog.