Hi.
I set up a new site and since 3 or 4 days, I am sometimes confronted with a problem of displaying the tiles of the Openstreetmap map with the message "Referer is required" and a reference to the https://wiki.openstreetmap.org/wiki/Blocked-tiles
This one indicates that I have to configure Referrer-Policy header to any of no-referrer-when-downgrade, origin, origin-when-cross-origin, strict-origin, or strict-origin-when-cross-origin.
My question is: is it at the Phoca Maps component level or elsewhere in the site that I have to do this?
Sometimes OSM displays "Referer is required"
-
AlainR
- Phoca Enthusiast

- Posts: 68
- Joined: 24 Jul 2018, 16:33
- Jan
- Phoca Hero

- Posts: 49514
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Sometimes OSM displays "Referer is required"
Hi,
this issue is not directly caused by Phoca Maps, but rather by a recent policy change by the official OpenStreetMap (OSM) tile servers. They now strictly require every request for map tiles to include the HTTP Referer header. If your hosting, security plugin, or template sets a too-restrictive policy (such as Referrer-Policy: no-referrer), the browser blocks this header, and OSM blocks the tiles.
You can resolve this issue temporarily in two ways:
At the site/server level: adjust your web server's HTTP headers (e.g., via .htaccess on Apache, Nginx configuration, or a security extension in Joomla) so that Referrer-Policy is set to strict-origin-when-cross-origin (or another permitted policy) instead of no-referrer.
Via HTML meta tag: you can add the following meta tag to the section of your Joomla template:
An upcoming update of the Phoca Maps component will also implement this parameter (referrerPolicy) directly into the map initialization script to prevent these blocks automatically.
Jan
this issue is not directly caused by Phoca Maps, but rather by a recent policy change by the official OpenStreetMap (OSM) tile servers. They now strictly require every request for map tiles to include the HTTP Referer header. If your hosting, security plugin, or template sets a too-restrictive policy (such as Referrer-Policy: no-referrer), the browser blocks this header, and OSM blocks the tiles.
You can resolve this issue temporarily in two ways:
At the site/server level: adjust your web server's HTTP headers (e.g., via .htaccess on Apache, Nginx configuration, or a security extension in Joomla) so that Referrer-Policy is set to strict-origin-when-cross-origin (or another permitted policy) instead of no-referrer.
Via HTML meta tag: you can add the following meta tag to the section of your Joomla template:
Code: Select all
<meta name="referrer" content="strict-origin-when-cross-origin">
Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero

- Posts: 49514
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Sometimes OSM displays "Referer is required"
Try to test version 6.1.1:
https://www.phoca.cz/download/81-phoca- ... -component
You can set the referrer policy for OSM script in Options:

Jan
https://www.phoca.cz/download/81-phoca- ... -component
You can set the referrer policy for OSM script in Options:

Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero

- Posts: 49514
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Sometimes OSM displays "Referer is required"
If you find Phoca extensions useful, please support the project