My companies GIS team has created a ArcGIS REST API for us developers to use. It allows us access to the GIS data so we can display the GIS data on our frontend products. I currently have created an endpoint that queries a data layer and returns the query in GeoJSON format. The requests work great on Postman (as expected) however when I make a request from our staging environment in development I get this CORS error.
Access to XMLHttpRequest at ” from origin ” has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: Redirect is not allowed for a preflight request.
My question becomes, is this a frontend CORS error? From what I have read ArcGIS allows ALL cross origin requests which leads me to believe this is a frontend error, but I have no good way to tell and be certain. However I have tried many things. This is the jQuery and AJAX request. Any help would be much appreciated
I tried possibly using a different request type rather than ajax, and I also tried grabbing a token from the application window as well as sending a request to generate one.
Dillon Arnold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
7