diff options
Diffstat (limited to 'ishtar_common/static/js/ishtar-map.js')
| -rw-r--r-- | ishtar_common/static/js/ishtar-map.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ishtar_common/static/js/ishtar-map.js b/ishtar_common/static/js/ishtar-map.js index ec11244a0..3b2bed785 100644 --- a/ishtar_common/static/js/ishtar-map.js +++ b/ishtar_common/static/js/ishtar-map.js @@ -191,7 +191,17 @@ var TrackPositionControl = (function (Control) { /* base layers */ var source_osm = function(options){ - options["source"] = new ol.source.OSM(); + options["source"] = new ol.source.OSM({ + // remove in when switching to OL>= 10.6.1 -> new ol.source.OSM() + tileLoadFunction: (imageTile, src) => { + const img = imageTile.getImage(); + // Set the per-image referrer policy before assigning the src + if (img && 'referrerPolicy' in img) { + img.referrerPolicy = 'origin-when-cross-origin'; + } + img.src = src; + } + }); return new ol.layer.Tile(options); }; |
