Error while loading view images - Issue with config between Orthanc and OHIF viewer

Hello Everyone,

I am trying to launch Orthanc explorer and OHIF viewer. For which I am following the files provided in the ‘Solution’ section of SO link (https://stackoverflow.com/questions/56610107/integrate-two-docker-apps-docker-compose-and-docker-run/56616067#56616067)

But when I try this, I get two errors when I try to open the study?

  1. 401 Unauthorized error - But my password in Orthanc.json and default.js is same/identical.

  2. CORS blocked issue - As you can see, I have set the Access-control-Allow-Origin to ‘*’ but still it says, it is blocked due to CORS policy

Should I be changing any parameter from true to false or vice versa?

Please note, I run a docker-compose command to start all the services. docker-compose file is also provided in the link for your reference.

image.png

But only thing is my docker runs in remote server. So I launch the Orthanc and OHIF viewer in my local desktop by port forwarding it. Not sure whether this is causing any issue.

Your help would really be appreciated. I am desperately looking for some help to get this fixed.

Thanks
Selva

Hello Everyone,

Does Orthanc require password anywhere else? I mean other than default.js and orthanc.json.

I couldn’t figure out why does it throw unauthorized error?

Can you help?

Thanks
Selva

image.png

I am not an expert but could you maybe try to run a reverse proxy to get rid of those CORS issues?

There is a nice tutorial here: https://gist.github.com/soheilhy/8b94347ff8336d971ad0

This is what I use when serving a client-side application that performs Orthanc REST calls

Hello Benjamin,

Thanks for sharing the link. As I am quite new to this, will you be able to kind of let me know whether my nginx.conf has to be modified?

I mean I already have mentioned the ports in listen section

Thanks
Selva

Hello Selva,

Unfortunately, I am rather new to web-based development and I merely pasted a pre-configured nginx.conf file that a colleague was successfully using.

Maybe someone else in the group, familiar with nginx, will be able to help?

Feel free to post it anyway :slight_smile:

I’m working on this right now, so i Haven’t solve on permanent basis.

For the development you can use google chrome cross origin extension from chrome store.

Here’s a sample of Nginx reverse proxy in front of Orthanc (note: this sample also include a TLS configuration):
https://bitbucket.org/osimis/orthanc-setup-samples/src/8e7cbe9f5400867e3736a24bd0fdb25efe2fc48c/docker/tls-with-nginx/
https://bitbucket.org/osimis/orthanc-setup-samples/src/8e7cbe9f5400867e3736a24bd0fdb25efe2fc48c/docker/tls-with-nginx/nginx/default.conf