I have a requirement to access WFS services (using Esri/WfsLayer) which are hosted in remote servers and I have to use Esri provided proxy code due to CORS policy issues.
My application is deployed in domain1.com and I am planning to deploy the proxy service in domain2.com. And then trying to access the remote server from domain1.com via proxy service hosted in domain2.com. I was trying with this approach, but couldn't achieve it using the codebase given here(jsp) . I am getting the same CORS issue with this.
Could anyone confirm if this is possible to do?
Because the proxy requests works fine if both application and proxy services are deployed in the same domain (I tested the same using sample application). But unfortunately I cannot deploy the proxy code in the same domain where my application is deployed.
My Proxy.config is as follows:
<ProxyConfig allowedReferers="*" logFile="proxy_log.log" logLevel="INFO" mustMatch="true"> <serverUrls> <serverUrl url="https://xxxxxxx/arcgis/services/xxxxx/MapServer/WFSServer" matchAll="true"/> </serverUrls> </ProxyConfig>
I came to know that both proxy and application has to be on same domain. But as I mentioned, I cannot use jsp/asp/php proxy code in the same domain where my application is running. Can someone please confirm is there any other ways to set up proxy for using the WFSLayer?