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
Try adding allowed origin domain names to your server.
Restrict cross-domain requests to ArcGIS Server—ArcGIS Server | Documentation for ArcGIS Enterprise
additionally:
CORS with the API | Overview | ArcGIS API for JavaScript 4.23 | ArcGIS Developer
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.