Starting today I am getting the following errors with leaflet (for every tilerow and col). I've had no trouble in over a year with this.
Cross-Origin Read Blocking (CORB) blocked cross-origin response http://foo:8008/bar?request=GetGTile&version=1.3.0&service=WMS&CRS=EPSG%3A3857&layer=foobar&tilezoom=6&tilerow=39&tilecol=62&time=2022-06-27T11:10:00Z with MIME type text/xml. See https://www.chromestatus.com/feature/5629709824032768 for more details.
The relevant code (I have removed specific server and data names):
var FOO_BAR_FOO = L.tileLayer('http://foo:8008/bar?request=GetGTile&version=1.3.0&service=WMS&CRS=EPSG%3A3857&layer=foobar&tilezoom={z}&tilerow={y}&tilecol={x}&{randint}',{
randint: generateRandInt
});
var overlayMaps = {
label: 'Label',
selectAllCheckbox: false,
children: [
{label: ...
...
},{label: 'Imagery',
selectAllCheckbox: false,
children: [
...
{ label: 'Layer labey', layer: FOO_BAR_FOO, radioGroup: 'bc' },
...
]
},{label: ...
...
}
]
};
function update_layer(){
FOO_BAR_FOO.redraw();
}
function update_tiles(date_string){
overlayMaps["children"][8]["children"][4]["layer"]._url = 'http://foo:8008/bar?request=GetGTile&version=1.3.0&service=WMS&CRS=EPSG%3A3857&layer=foobar&tilezoom={z}&tilerow={y}&tilecol={x}&time='+date_string+'';
for (n=0;n<1;n++){
overlayMaps["children"][8]["children"][n]["layer"].redraw();
}
}
setInterval(update_layer, 240000);
When first loading the page, the tile layer works fine. It's when the page calls for redraw (either automatically, or through a scrolling menu, given this is satellite imagery) that I get the CORB error.
Weirdly, if I manually run either update_layer() or update_tiles() - with a correct date string for the latter - in the console, it works fine. The CORB only happens with the setInterval() calling of the function or the scrolling menu (which is a jquery change listener).
Why would the behaviour change overnight? Is this server related (either the internal web server that the page is hosted on or the server I'm making the tileLayer request from?)