add referrerPolicy: origin to openstreetmap requests
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Mar 21, 2026 at 19:12 UTC
72bc845a5b9d29e7fab199924903f95fc6f9b373
2 files changed
+18
-2
views/default.handlebars
+9
-1
@@ -7034,7 +7034,15 @@
7034
});
7035
7036
// Create a tile and use OSM source
7037
- xxmap.mapLayer = new ol.layer.Tile({ source: new ol.source.OSM() });
7037
+ xxmap.mapLayer = new ol.layer.Tile({
7038
+ source: new ol.source.OSM({
7039
+ tileLoadFunction: function(imageTile, src) {
7040
+ var img = imageTile.getImage();
7041
+ img.referrerPolicy = 'origin';
7042
+ img.src = src;
7043
+ }
7044
+ })
7045
+ });
7046
7047
xxmap.mapView = new ol.View({ // Set the initial view
7048
center: ol.proj.transform([0, 0], 'EPSG:4326', 'EPSG:3857'),
views/default3.handlebars
+9
-1
@@ -7920,7 +7920,15 @@
7920
});
7921
7922
// Create a tile and use OSM source
7923
- xxmap.mapLayer = new ol.layer.Tile({ source: new ol.source.OSM() });
7923
+ xxmap.mapLayer = new ol.layer.Tile({
7924
+ source: new ol.source.OSM({
7925
+ tileLoadFunction: function(imageTile, src) {
7926
+ var img = imageTile.getImage();
7927
+ img.referrerPolicy = 'origin';
7928
+ img.src = src;
7929
+ }
7930
+ })
7931
+ });
7932
7933
xxmap.mapView = new ol.View({ // Set the initial view
7934
center: ol.proj.transform([0, 0], 'EPSG:4326', 'EPSG:3857'),