AnsweredAssumed Answered

Setting proxy to work with localhost

Question asked by MollyKFoley on Nov 26, 2018
Latest reply on Nov 26, 2018 by MollyKFoley

I'm trying to use my development environment to work on some things and currently the data on my map gets loaded through a proxy service. The proxy isn't set up to allow a localhost referrer so I would like to do so. I think this would be possible but I'm struggling to get it to work. I get a 404 error. Request URL comes out looking like this:

http://locahost:14906/appName/proxy/proxy.ashx?https://www.mydomain.org/myserver/rest/services/HabitatMonitoring/HabitatData/MapServer/4?f=json

 

Current config file:

<ProxyConfig allowedReferers="https://www.mydomain.org/*,http://localhost:14906/*"
             mustMatch="true"
             logFile="proxyLog.txt"
             logLevel="Warning">

    <serverUrls>
      <serverUrl url="https://www.mydomain.org/myserver/rest/services/HabitatManagement/HabitatManagement/GPServer"
                 username="xxx"
                 password="xxx"
                 matchAll="true"/>

      <serverUrl url="https://www.mydomain.org/myserver/rest/services/HabitatMonitoring/HabitatData/MapServer"
                 username="xxx"
                 password="xxx"
                 matchAll="true" />

      <serverUrl url="https://www.mydomain.org/myserver/rest/services/HabitatMonitoring/HabitatClassification/GPServer"
                 username="xxx"
                 password="xxx"
                 matchAll="true" />

    </serverUrls>
</ProxyConfig>

 

Do I need to add localhost somehow as serverUrls? I'm not sure how that would look because accessing my rest services from localhost uses the same server URLs seen in the above code. You can't access them like "http://localhost:14906/myserver/rest/services/...."

Outcomes