Skip to content
Chris Hafey edited this page Apr 20, 2016 · 4 revisions

CORS or Cross Origin Resource Sharing is a browser security policy that prevents javascript from loading data from a server with a different base URL than the server that served up the javascript file. This situation frequently happens because the WADO server is often different than the server that serves up the web app. For example - you may be using Orthanc to serve DICOM P10 running on one machine or port (e.g. http://localhost:8042/wado/...) but your web app is running under a different web server on a different machine or port (e.g. http://localhost:8080/myCoolWebApp).

To identify if this is the problem, check your browser console for a console warning related to CORS. Here is an example message from chrome:

XMLHttpRequest cannot load http://localhost:8042/instances/f02b928d-540b5853-cac1066b-d7cc0d00/file. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://rawgit.com' is therefore not allowed access.

How to fix:

  1. Add support for CORS to your WADO server (see the enable cors web site)
  2. Run a CORS Proxy (e.g. CORSProxy
  3. Run your web app from your WADO Server
  4. Start your web browser with CORS disabled
Clone this wiki locally