My website used to work, but now it no longer does. I have a custom web map set up with a proxy and I recently tried to publish it after moving our website to a new server and now it's giving me this error message:
{"error": {"code": 403,"message":"403 - Forbidden: Access is denied.","details":["message":"Current proxy configuration settings do not allow requests which do not include a referer header."]}}
I have my proxy code set up like this:
In the javascript web map file:
//Set up the proxy to forward requests for data/geoprocessing tools
urlUtils.addProxyRule({
urlPrefix: "https://www.mydomain.com",
//For production environment (publishing)
proxyUrl: "/myAppName/proxy/proxy.ashx"
});
In my proxy.config file:
<ProxyConfig allowedReferers="https://www.mydomain.com/*"
mustMatch="true"
logFile="proxyLog.txt"
logLevel="Warning">
<serverUrls>
<serverUrl url="https://www.mydomain.com/webadaptor/rest/services/HabitatManagement/HabitatManagement/GPServer"
username="username"
password="password"
matchAll="true"/>
<serverUrl url="https://www.mydomain.com/webadaptor/rest/services/HabitatMonitoring/HabitatData/MapServer"
username="username"
password="password"
matchAll="true" />
<serverUrl url="https://www.mydomain.com/webadaptor/rest/services/HabitatMonitoring/HabitatClassification/GPServer"
username="username"
password="password"
matchAll="true" />
<serverUrl url="https://www.mydomain.com/webadaptor/rest/services/PrintHabitatMaps/PrintHabitatMap/GPServer"
username="username"
password="password"
matchAll="true" />
<serverUrl url="https://www.mydomain.com/webadaptor/rest/services/ShipData/ShipData/GPServer"
username="username"
password="password"
matchAll="true" />
<serverUrl url="https://www.mydomain.com/webadaptor/rest/services/Collector/FieldMapsHbData/GPServer"
username="username"
password="password"
matchAll="true" />
</serverUrls>
</ProxyConfig>
This is the request header for one of the map services trying to be reached:
This is the error info:
The proxyLog.txt file gives me this error. I'm don't really know anything about networks, but I don't understand why it says I have a null referer yet the request header has a value in referer??:
The Proxy is being called by a null referer. Access denied.