geoserver https and cors error

743
2
Jump to solution
03-21-2019 03:33 AM
RubyStroschein
New Contributor III

Today I have error in previously working coe. Api version is 4.9

geometryService = new w.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");

Access to XMLHttpRequest at 'https://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

0 Kudos
1 Solution

Accepted Solutions
RubyStroschein
New Contributor III

Fixed the issue by discovering new url for GeometryServer

"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer"

config | API Reference | ArcGIS API for JavaScript 4.10 

View solution in original post

2 Replies
RubyStroschein
New Contributor III

Fixed the issue by discovering new url for GeometryServer

"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer"

config | API Reference | ArcGIS API for JavaScript 4.10 

Noah-Sager
Esri Regular Contributor

Don't forget to mark the correct answer to your post (even if it's your own answer )

0 Kudos