Select to view content in your preferred language

Handling CORS

2725
2
05-09-2022 05:19 AM
AdrianaPaese
Frequent Contributor

Hello

we are trying to access a WMS layer (https://geoservicos.pbh.gov.br/geoserver) from our ArcGIS API for JavaScript application, but we are getting the following error message:

Access to fetch at '

https://geoservicos.pbh.gov.br/geoserver/wms?SERVICE=WMS&REQUEST=GetCapabilities' from origin 'null' has been blocked by CORS policy: No Access-Control-Allow-Origin header is present in the requested resource. If an opaque response serves your needs, set the request mode to ´no-cors` to fetch the resource with CORS disabled.

I am not sure how we can set the request mode to ´no-cors`. 

Would someone please help with that?

Thank you

0 Kudos
2 Replies
Vakhtang_Zubiashvili
Frequent Contributor

Hi,

I have CORS issue too in my map. I have added proxy, but it did not help. I have little different issue, my error is multiple headers. It would be good if  anyone make detailed explanation how CORS could be handled.

0 Kudos