aardgoose / CaveView.js

Web native 3d cave survey viewer
https://aardgoose.github.io/CaveView.js/
MIT License
44 stars 11 forks source link

CORS issue when fetching EPSG information #55

Open MaticDiba opened 1 year ago

MaticDiba commented 1 year ago

Hi, I'm sure this was working before, but it's not anymore. When using Cesium and trying to fetch EPSG information I get this:

Access to fetch at 'https://epsg.io/3912.proj4' from origin 'my hostname' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled

Is this a known issue?

aardgoose commented 1 year ago

Hi,

I haven't seen them before but the latest version 2.6.1 should fix the problem. Let me know if this fixes your problem

Cheers

MaticDiba commented 1 year ago

I saw you reverted the change for CORS. I tried that flag no-cors myself, but headers are still the same.

aardgoose commented 1 year ago

Can you send me the url of a demo of this problem. I suspect it is a problem with the CORS settings of the serving site?

MaticDiba commented 1 year ago

I checked it out again, and there was another dependency that was manipulating CORS headers for fetch. I whitelisted this domain, and now it works again. Sorry, for false alert.