RC RANDOM CHAOS

Datasette plugin lets sites override default no-referrer policy for OSM tiles

· via Simon Willison

Original source

datasette-referrer-policy 0.1

Simon Willison →

Simon Willison debugged broken OpenStreetMap tiles on the Datasette global-power-plants demo and traced the issue to two separate problems. A CAPTCHA he had recently added to the site was intercepting .json fetch requests from the map plugin, but because those requests weren’t HTML the user never saw a challenge to solve, silently breaking them. The second issue was that OpenStreetMap blocks tile requests from origins sending a Referrer-Policy: no-referrer header, which Datasette emits by default.

Rather than change the default header behavior and risk surprising existing users, Willison built datasette-referrer-policy, a small plugin that lets operators override the policy value. He used Codex with GPT-5.5 to generate the plugin code. The release is a useful reminder that strict referrer policies can quietly break legitimate third-party integrations like map tile providers that rely on the Referer header to enforce usage policies.

Read the full article

Continue reading at Simon Willison →

This is an AI-generated summary. Read the original for the full story.