Hi,
I set up the php Proxy from Esri/resource-proxy · GitHub . The Proxy works for unsecured service. Whe I try to access my secured service I always get
ArcGIS REST Services Directory
Home > services API Reference
JSON
Token Required
My configuration file is set up correctly for testing:
<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
logFile="proxy_log.log"
mustMatch="true">
<serverUrls>
<serverUrl url="http://services2.arcgis.com"
matchAll="true"
username="####"
password="####"/>
</serverUrls>
</ProxyConfig>
<!-- See https://github.com/Esri/resource-proxy for more information -->
When I look into the logfile I find this:
11-10-14 15:27:26 | GET detected
11-10-14 15:27:27 | Ok to proxy
11-10-14 15:27:27 | Proxy complete
When I compare my logfile to others in this forums, it seems like my proxy doens't authenticate and doesn't get and appending a token to the request.
Anyone knows this problem and could offer me a solution?
Thanks,
Mark
After 10 hours of code searching I found the problem in the documentation at github:
The Server URL using ArcGIS online has to contain your specific organization code. You can find it, when you inspect the Service-URL of an feature-service http://services2.arcgis.com/YOURCODE. Use this URL as your url in <serverUrl>.