datasette-leaflet 0.3 Fixes OpenStreetMap Referrer Header Compliance Issue

datasette-leaflet 0.3 adjusts referrer policy to fix OpenStreetMap tile request compliance.
datasette-leaflet 0.3 changes tile request referrer policy from global no-referrer to strict-origin-when-cross-origin to comply with OpenStreetMap's requirement for referrer headers. The root cause was Datasette table pages globally using no-referrer, causing map plugins relying on OpenStreetMap tiles to violate policy. The new policy sends only the origin host in cross-origin requests while hiding page paths, balancing compliance and privacy. As a foundational dependency for Datasette map plugins, upgrading restores compatibility without API changes at low cost.
Background: A Compliance Issue Triggered by an Overlooked HTTP Header
OpenStreetMap, the open-source mapping service, has a reasonable policy for its hosted tile servers: requests should carry a referrer header so the service can understand traffic sources. However, Datasette's table pages have long used a Referrer-Policy: no-referrer response header, causing plugins that rely on OpenStreetMap tiles to violate this policy when loading maps. According to Simon Willison's release notes, this issue does not stem from an implementation flaw in any single plugin, but rather from a conflict between Datasette's global policy and third-party service requirements.
datasette-leaflet was created precisely to solve the Leaflet dependency problem—it bundles a copy of Leaflet so that other Datasette plugins don't each need to bring their own. Version 0.3 adjusts the referrer policy for tile requests to strict-origin-when-cross-origin, passing the hostname in requests while hiding the full page path—satisfying OpenStreetMap's requirements while avoiding leaking specific page addresses.

Referrer-Policy and the referrer header
The HTTP Referrer-Policy response header controls whether and how browsers include the Referer request header (note the standard spelling is Referer, a legacy misspelling that stuck) when making requests. Through this policy, servers can limit URL information leaked in cross-site requests. Common values include no-referrer (never send), origin (send only the origin), strict-origin-when-cross-origin (send full URL for same-origin, only origin for cross-origin, nothing on HTTPS→HTTP downgrade), and others. OpenStreetMap requires tile requests to carry a referrer in order to identify traffic sources, prevent abuse, and assess service load—so clients relying on its tiles must honor this convention.
Technical Details: The Trade-offs of strict-origin-when-cross-origin
strict-origin-when-cross-origin is one of the browser default referrer policies. Its behavior can be summarized as: same-origin requests send the full URL, cross-origin requests send only the source host, and nothing is sent when downgrading from HTTPS to HTTP. For OpenStreetMap tile requests—a typical cross-origin scenario—this policy delivers exactly the host information needed while excluding the page path.
This change may seem minor, but it reflects the plugin maintainer's respect for ecosystem rules. Rather than crudely removing no-referrer globally, setting a policy specifically at the tile request level is a more refined approach—Datasette's main pages can maintain strict privacy settings, and only requests that need to interact with external services are relaxed to the necessary degree.
Cross-origin requests and the definition of origin
In the browser security model, an "origin" consists of the protocol, host, and port triple—any difference makes a request cross-origin. The strict-origin-when-cross-origin policy sends only the "origin" information (e.g., https://example.com) for cross-origin requests, without path or query string. For requests from a Datasette page (e.g., https://example.com/db/table) to OpenStreetMap tile servers (e.g., https://tile.openstreetmap.org/...), this is a typical cross-origin scenario, so only the host-level origin https://example.com is transmitted. This lets OpenStreetMap identify traffic sources while preventing leakage of specific data page paths.
Impact on the Datasette Plugin Ecosystem
datasette-leaflet serves as a foundational dependency layer—any plugin that renders maps in Datasette may depend on it indirectly. This fix means these plugins no longer need to handle referrer policies individually; upgrading the base library restores compatibility with OpenStreetMap.
From a broader perspective, this type of issue reveals a common tension in open-source toolchains: host applications' default security policies and third-party services' interface requirements often need explicit coordination. Datasette excels at data exploration and publishing, with map visualization being a common use case, and tile request compliance directly affects user experience. The maintainer explicitly cited the policy basis in the release notes, providing a reference approach for other plugin authors.
Datasette plugin architecture and Leaflet dependencies
Datasette is a Python-based data exploration and publishing tool whose plugin system allows functionality extension through hooks. The datasette-leaflet plugin's role is to centrally bundle the Leaflet frontend library and serve it to other plugins via static asset routes, avoiding each map plugin having to include Leaflet separately. Since Leaflet triggers tile requests directly from the browser, the host page's Referrer-Policy applies to these requests—so a policy adjustment at the foundational dependency layer can fix compatibility issues for all downstream plugins at once, without each plugin handling it individually.
Upgrade Recommendations
Users of Datasette map-related plugins should upgrade to datasette-leaflet 0.3 as soon as possible. This version doesn't change the API and is a compatibility fix, so the upgrade cost is low. For developers building their own plugins, it's worth checking whether your tile requests are affected by the host page's referrer policy, and if necessary, following this example to set policies specifically at the request level.
OpenStreetMap's tile service is a public resource—complying with its referrer header policy is both a technical requirement and basic courtesy for maintaining service sustainability. The change in datasette-leaflet 0.3 is small, but it's a detail worth noting in open-source community collaboration.
Related articles

AI Writes Your Code—Do You Still Need to Learn Git? Five Reasons
AI coding agents handle Git operations automatically—is it still necessary to learn Git? Five reasons: team communication, reviewing agent PRs, monitoring code changes, fallback when AI goes down, and the joy of learning—plus how the focus of learning Git is shifting in the agent era.

Anthropic Reportedly Prices IPO at $83 Per Share, Valuing Company at $1.5 Trillion
Anthropic reportedly prices IPO at $83 per share, above the expected range, with a fully diluted valuation of $1.5 trillion. This article analyzes the signal significance of the pricing and its impact on the AI industry's financing environment.

Open-Source Code Hosting Platform Codeberg Suffers Outage, Sparking Debate in Developer Community
Open-source code hosting platform Codeberg.org suffered an outage, sparking Hacker News debate over nonprofit platform stability and open-source infrastructure dependency risks.