Datasette‑referrer‑policy 0.1 Fixes OSM Tile Rendering Issues
Patch the datasette‑referrer‑policy 0.1 plugin to set Referrer‑Policy header to a value that permits OpenStreetMap tile requests, fixing the CAPTCHA trigger and tile blocking issues.
Patch the datasette‑referrer‑policy 0.1 plugin into your Datasette deployment and configure the Referrer‑Policy header to an appropriate value (e.g., "origin") to allow OpenStreetMap tiles.
Summary
Datasette‑referrer‑policy 0.1 was released on GitHub to address two bugs that were preventing OpenStreetMap tiles from rendering in the global‑power‑plants demo.
The first bug was caused by a CAPTCHA added to the site that triggered on the .json fetches used by the map plugin; the CAPTCHA was not presented because those requests were not HTML. The second bug was that OpenStreetMap blocks tile requests from sites that send a Referrer‑Policy: no‑referrer header, which Datasette uses by default. To solve this, the new plugin allows users to set a different Referrer‑Policy header value without changing the default for others. The fix was implemented in a commit that disables the CAPTCHA for JSON requests, and the plugin was built with Codex and GPT‑5.5. The release is version 0.1 and includes a simple configuration option to override the header.
Key changes
- Fixes CAPTCHA trigger on .json fetches
- Adds ability to set Referrer‑Policy header to a custom value
- Prevents OSM tile requests from being blocked by no‑referrer header
- Default remains no‑referrer; plugin allows override
- Release version 0.1