So we have a basemap thats fetched from a url
var basemap = new ArcGISTiledMapServiceLayer("https://examplemap.com");
The problem is that we are supposed to use a proxy to connect to this basemap. Where do you place the proxy and how?
The proxy sent to us looks approximately like this "https://randomexample.com/proxy.ashx
Best Regards
You can place the proxy anywhere on your web server e.g. in the root under a folder called "proxy". Then in your Javascript you specify which services and URLs must route through the proxy page:
esriConfig.defaults.io.proxyUrl = '/proxy/proxy.ashx'; esriConfig.defaults.io.alwaysUseProxy = false; urlUtils.addProxyRule({ urlPrefix: 'https://example.com', proxyUrl: '/proxy/proxy.ashx' });
And in the proxy config you must specify the access credentials