hapi-server / server-ui

Web interface code for HAPI servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better error message when no CORS

rweigel opened this issue · comments

Message:
error

The Javascript console reports

Access to XMLHttpRequest at 'http://planet.physics.uiowa.edu/das/das2Server/hapi/catalog' from origin 'http://hapi-server.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Partial fix visible at http://hapi-server.org/servers-dev/#server=DAS2

Will need to use one of the techniques at https://stackoverflow.com/q/19325314 to determine if generic error is due to CORS. If so, message should be that server's header does not allow and point to section in spec that covers CORS.