HTML5 Proxy Page
I have set up a Typescript addin based on the Quickstart sample.
Inside i would like to set up the Queryask to use a proxy page.
I would like to use the following javascript inside the Typescript application but I'm not sure what i need to do to get it to work.
////////////////////////////////////////////////////////////////////////////////////////////////////////////
esri.urlUtils.addProxyRule({
urlPrefix: "MyURL",
proxyUrl: "MyProxy"
});
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
Do I need to import a module or reference a seperate <name>.d.ts file?
Is there a better way to query a secure service?
Any help would be appreciated.
Thanks,
Rob
0
-
Hi,
You can add this to the HTML5 Viewer index.html page.
Replace:new geocortex.essentialsHtmlViewer.ViewerLoader().loadAndInitialize();
With:new geocortex.essentialsHtmlViewer.ViewerLoader().loadAndInitialize({ onInitialized: function () { esri.addProxyRule({ urlPrefix: "http://server.domain.com/arcgis/rest/services", proxyUrl: "/proxy/proxy.ashx" }); } });
Thanks,
Mike Ketler0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar