No 'Access-Control-Allow-Origin' header is present on the requested resource.

2715
2
04-27-2017 09:25 AM
SPNIOrganization
Occasional Contributor

Hi,

I made a gp tool using the model builder. the tool  is making an intersection between a point layer and a line layer.

I published the gp tool to my GIS server and I want to use it in WAB. So I from the GP widget I chose the GP tool in my server.

when I executed the tool I get no results and in the browser console I get this error:

MLHttpRequest cannot load http://mapateva.org.il/arcgis/rest/services/Tools/SelectingRoadKillsByRoadNumber/GPServer/Select%20R.... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://deshe.maps.arcgis.com' is therefore not allowed access.

what do I need to do?

Thanks,

Dikla.

0 Kudos
2 Replies
sapnas
by
Occasional Contributor III

I believe you need to add the server in config.json file. 

"authorizedCrossOriginDomains": [
"deshe.maps.arcgis.com" ]

0 Kudos
DE_WAZIERESFLORENT
New Contributor

Hi,

For testing i use CORS module (exist on chrome and firefox). It add the Allow-Cross-Origin on the response request header automatically.

0 Kudos