Closed (works as designed)
Project:
Leaflet
Version:
10.4.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2026 at 09:19 UTC
Updated:
28 May 2026 at 06:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
itamair commentedWell no, definitely DOES NOT look a Drupal Leaflet module BUG,
but something specifically related to your pages web server setup and requests to OpenstreetMap Tiles.
Probably your specific setup make your browser not sending HTTP Referer.
You should better set your settings and make sure you are complying with OpenstreetMap Tile Usage Policy: https://operations.osmfoundation.org/policies/tiles/
On the Drupal Leaflet module side all looks working fine.
I can’t reproduce the issue you report in some Drupal Leaflet module implementations that I manage, and that are still working fine on the OpenstreetMap tiles, as you can check by yourself:
Drupal Geofield - Leaflet map Demo site:
https://www.geodemocracy.com/drupal_geofield_stack_demo/web/geojson-map-...
Drupal Core: 11.3.4 - PHP: 8.3.30 - Drupal Leaflet: 10.4.4
(screenshot attached showing Referrer set in the HPP Request … )
Taranto-Viva website: https://www.taranto-viva.com
Drupal Core: 11.3.5 - PHP: 8.3.30 - Drupal Leaflet: 10.4.4
Just check and choose the Openstreetmap Layer from the Switcher on the top-right corner
(screenshot attached showing Referrer set in the HPP Request … )
The Way of GODS prototype: https://www.geodemocracy.com/via-degli-dei-2024/web/
Drupal Core: 11.3.5 - PHP: 8.3.30 - Drupal Leaflet: 10.2.43
Just check and choose the Openstreetmap Layer from the Switcher on the top-right corner
(screenshot attached showing Referrer set in the HPP Request … )
Just make sure you are correctly setting and requiring Openstreet Map Tiles layer so as described in the Drupal Leaflet module documentation:
https://git.drupalcode.org/project/leaflet#defining-a-custom-map--hook_l...
and make sure you are not making strange overrides/alters in your server setup Http Requests.
Comment #4
jonathan_hunt commentedfwiw, I had a site with this issue. It turns out I had
seckitmodule enabled with referrer policy set tosame-origin. Per advice at https://wiki.openstreetmap.org/wiki/Blocked_tiles#Referer_is_required setting theseckitreferrer policy toorigin-when-cross-originmeant referer header is sent and OSM is serving tiles ok.Comment #5
quentin massez commentedYou were right !!
That was a problem on my website configuration, i had referrer policy same-origin.
I changed it to origin-when-cross-origin and it works !
Thank you to both of you
Regards
Comment #6
michael.acampora commentedThere are security benefits of setting the referrer to something like same-origin, so would not recommend changing that. Leaflet has the option to set a referrer for retrieving the tiles. That way you only change the referrer for getting some tiles.
You can do something like this: