Hi,
I'm getting multiple CORS errors on my electron react app for windows when using react-map-gl.
The map is actually loading fine and seemingly working fine as well, but my log shows these errors:
Access to fetch at 'https://events.mapbox.com/events/v2?access_token=TOKEN' from origin 'http://localhost:1212' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
AND
mapbox-gl.js:31 POST https://events.mapbox.com/events/v2?access_token=TOKEN net::ERR_FAILED 204
Any idea how to solve this? I can't change the request's mode to 'no-cors' as recommended by the error, since the request is done by the react-map-gl lib.
When trying to enable 3D Terrain, I'm getting similar errors constantly and most of the time the 3D Terrrain is not working
Description
Hi, I'm getting multiple CORS errors on my electron react app for windows when using react-map-gl. The map is actually loading fine and seemingly working fine as well, but my log shows these errors:
Access to fetch at 'https://events.mapbox.com/events/v2?access_token=TOKEN' from origin 'http://localhost:1212' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
ANDmapbox-gl.js:31 POST https://events.mapbox.com/events/v2?access_token=TOKEN net::ERR_FAILED 204
Any idea how to solve this? I can't change the request's mode to 'no-cors' as recommended by the error, since the request is done by the react-map-gl lib.
When trying to enable 3D Terrain, I'm getting similar errors constantly and most of the time the 3D Terrrain is not working
Environment