aconnolly

GeometryServic Buffer Task & Access-Control-Allow-Origin

Discussion created by aconnolly on Mar 1, 2013
Latest reply on Mar 5, 2013 by aconnolly
Hi,

I've read alot about Access-Control-Allow-Origin issues with Chrome on this forum, already but I can't seem to find a solution to my problem. What is happening is this. A user searches for an address in my app and then my app takes the x,y of the address and attempts to have a buffer graphic created around that x,y and then I display the point and the circle buffer on the map. In all other browsers this works fine, but in Chrome the buffer task is killed by the browser:

XMLHttpRequest cannot load http://mapping.theomegagroup.com/ArcGIS/rest/info?f=json. Origin http://www.crimemapping.com is not allowed by Access-Control-Allow-Origin. 


In previous threads I have read that the Access-Control-Allow-Origin error can be safely ignored, but why does this same error break my buffer processing?

I'm not sure that adding this to my ArcGIS Server web.config is going to work because it opens it up for Cross Site scripting access, right? Though I've heard this would work.

    <httpProtocol>
      <customHeaders>
        <add name="Access-Control-Allow-Origin" value="*" />
      </customHeaders>
    </httpProtocol>


Can anyone help me with this? I don't control the request that is sent out by the buffer task and so I can't specify JSONP types, etc... Is this a proxy page issue? Why does this work in other browsers and not Chrome?

Thanks,
-Aaron

Outcomes