Skip to main content

Send Web Request CORS Issues (How is this expected to work?)

Comments

5 comments

  • Berend Veldkamp

    The server may or may not return the required CORS headers in response to the Web Request. If it doesn't, and you don't control that server, you're out of luck, and you should use either a server workflow or a proxy script.

     

    Using Fiddler, you can see that both highcharts and httpbin return Access-Control-Allow-Origin: *.

    1
  • Niluka Munasinghe

    Thanks for the suggestion, Berend. Could you please elaborate on how to send the request with a proxy script?

    0
  • Berend Veldkamp

    Niluka Munasinghe Could you be more specific? If you have access to a GVH (Geocortex Viewer for HTML), I'd encourage you to take a look at the proxy.ashx script

    0
  • Niluka Munasinghe

    Thanks for the response, Berend. I'm getting a CORS error because the current API response doesn't include the Access-Control-Allow-Origin header. 

    I had a look at the proxy.ashx file. But I'm not good with C#.

    If you can guide me on configuring the proxy, that'd be really helpful. 

    0
  • Berend Veldkamp

    Niluka Munasinghe There is some excellent documentation here: https://docs.vertigisstudio.com/essentials/gvh/latest/install-help/Default.htm#gvh/install/proxy-page.htm

    0

Please sign in to leave a comment.