Select to view content in your preferred language

Firefox OPTIONS http request when it should be a POST request

807
0
09-26-2014 06:52 AM
JonathanKnowles
Deactivated User

Hi

I have an app running version 3.10 of the javascript api.

I am accesing map services on a remote server.

I have the latest proxy intalled and configured (the April version) Releases · Esri/resource-proxy · GitHub 

Proxy is configured as follows;

<xml version="1.0" encoding="utf-8" ?>

<ProxyConfig allowedReferers="*" mustMatch="false">

     <serverUrls>

     <serverUrls>

<ProxyConfig>

All requests route successfully through the proxy web handler.

The webservices on the remote server have been secured with token security, a token is generated against 'servername/arcgis/tokens' and appended to all requested urls without any problems.

My problems arise in Firefox, I draw a graphic line, buffer it and then use the resulting geometry in the Identify task. A POST http request is triggered when inspecting the net requests in firebug, but before this request is made an OPTIONS request is made against our remote server. The server subsequently rejects the request.

From a couple of hours googling I have discovered i need to null out the X-Requested-With from the http headers.

I have plugged in the esriRequest.setRequestPreCallback with a function, but i cant seem to get at the headers > X_requested-With property.

Has anyone else experienced this ? Is it firefox browser x-domain security causing this OPTIONS request to be made ? Or is it dojo ??

Thanks

Jonathan

0 Kudos
0 Replies