You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Upgraded the bundled Leaflet from 1.7.1 to 1.9.4. #8
The JavaScript is still an ES module, loaded with import(datasette.leaflet.JAVASCRIPT_URL). Importing it continues to set a global window.L, so Leaflet plugins that expect that global, such as Leaflet.markercluster, keep working. #12
Tile layers now send the origin of the Datasette site as their Referer header by default. Datasette serves table pages with Referrer-Policy: no-referrer, which caused tile.openstreetmap.org to respond with "Access blocked" tiles. The bundled Leaflet changes the default of the referrerPolicy tile layer option to strict-origin-when-cross-origin, so tile servers see https://example.com/ but never the path or query string of the page showing the map. This applies to every plugin that uses this copy of Leaflet.
New tile_referrer_policy plugin setting for changing that policy, or turning it off with false. The value is available to JavaScript as datasette.leaflet.TILE_REFERRER_POLICY. The referrerPolicy option on an individual tile layer takes precedence. See Tile layers and the Referer header.
New update_leaflet.py script for downloading and bundling a new version of Leaflet.