# OHIF Inconsistency with osimis/orthanc images

**URL:** https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726
**Category:** General
**Created:** [July 18, 2023, 8:36am UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726 "2023-07-18T08:36:19Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![rishibroto1006](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rishibroto1006](https://discourse.orthanc-server.org/u/rishibroto1006)
#### Post date: [July 18, 2023, 8:36am UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/1 "2023-07-18T08:36:19Z")

</div>

Hello,

I’m using the osimis/orthanc:master-full-stable image which integrates OHIF. Tested it on old explorer as well as on Orthanc Explorer 2.

On the old explorer, it shows a CORS error while using OHIF viewer. On the Orthanc Explorer 2, regardless of whichever IP the docker is hosted on, the OHIF viewer has the localhost URL.

Refer to the following link for my Orthanc configuration.  
[Orthanc Configuration](https://drive.google.com/file/d/1sSmablxx3HxFqrz4lQNxMzY-DFfNhl0U/view?usp=sharing)

Screenshots are attached. Requesting your kind inputs @sdscotti @jodogne @alainmazy

 ![Screenshot from 2023-07-18 13-58-44](https://discourse.orthanc-server.org/uploads/default/original/2X/d/df72952a05efb5dcb6d78abe71ca30d73aaa3af7.png)  
 ![Screenshot from 2023-07-18 13-58-30](https://discourse.orthanc-server.org/uploads/default/original/2X/d/d6625563633ab9003f1207a6e7e1debaa79e24cb.png)  
 ![Screenshot from 2023-07-18 13-57-07](https://discourse.orthanc-server.org/uploads/default/original/2X/7/76bcf0fd274b01e226584e390d5901d0fc7bd7ef.png)  
 ![Screenshot from 2023-07-18 13-56-52](https://discourse.orthanc-server.org/uploads/default/original/2X/9/90d9a61d238909c4d5f1923926ba4537115efaab.png)

---

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [July 18, 2023, 1:33pm UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/2 "2023-07-18T13:33:16Z")

</div>

Hi

> [@rishibroto1006](#):
>
> On the Orthanc Explorer 2, regardless of whichever IP the docker is hosted on, the OHIF viewer has the localhost URL.

Don’t you think that this configuration could explain this ?  
 ![image](https://discourse.orthanc-server.org/uploads/default/original/2X/5/56b6b3ec316ef0296da81e2d0ef604ab8183c2ef.png)

Also note that you have shared secret credentials in your configuration file. Don’t be surprised if your data gets compromised

Alain

---

<div class="post-metadata">

### Author: ![rishibroto1006](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rishibroto1006](https://discourse.orthanc-server.org/u/rishibroto1006)
#### Post date: [July 18, 2023, 1:35pm UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/3 "2023-07-18T13:35:16Z")

</div>

Thank you so much for pointing it out. Currently, it’s on local docker. Will definitely pass those as secrets once It’s deployed. What about the CORS issue though?

---

<div class="post-metadata">

### Author: ![rishibroto1006](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rishibroto1006](https://discourse.orthanc-server.org/u/rishibroto1006)
#### Post date: [July 19, 2023, 7:03am UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/4 "2023-07-19T07:03:22Z")

</div>

> [@rishibroto1006](#):
>
> On the old explorer, it shows a CORS error while using OHIF viewer.

Any update on this? It works fine on using localhost as IP, but throws CORS error when using system IP where it’s deployed on docker.

---

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [July 19, 2023, 7:44am UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/5 "2023-07-19T07:44:10Z")

</div>

Don’t forget that other people have other stuffs to do than responding to your questions - sometimes, they even need to sleep, eat and enjoy their life. Trying to push them with this kind of reminders is the best way not to receive a response.

 ![image](https://discourse.orthanc-server.org/uploads/default/original/2X/8/8880fcccd9b512e251f3f3dbf5228e500f37c8ae.png)

---

<div class="post-metadata">

### Author: ![rishibroto1006](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rishibroto1006](https://discourse.orthanc-server.org/u/rishibroto1006)
#### Post date: [July 19, 2023, 8:36am UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/6 "2023-07-19T08:36:52Z")

</div>

Apologies Alain. I work in a different timezone than yours. Yesterday, I messaged you when I logged off at work. Today, when I logged in, I thought of just reminding you with some additional details. My team and me are doing some extensive research on this and are desperately awaiting for a resolution on this. I apologise again if my reminders have caused inconvenience to you. Will await your response.

---

<div class="post-metadata">

### Author: ![Holakunle69](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/holakunle69/32/1876_2.png) [@Holakunle69](https://discourse.orthanc-server.org/u/Holakunle69)
#### Post date: [July 19, 2023, 9:06am UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/7 "2023-07-19T09:06:41Z")

</div>

Hello

Just like alain said, you need to have a little bit of patience. However your question have been answered here

> [@New plugin: OHIF](https://discourse.orthanc-server.org/t/new-plugin-ohif/3627):
>
> Dear Orthanc community, Following the huge number of requests about the integration between Orthanc and [OHIF](https://ohif.org/) on this forum, I have decided to create a plugin to make the use of OHIF within Orthanc fast and effortless. Check out the [demo video](https://www.youtube.com/watch?v=-lzddzq9iT4)! Thanks to this plugin, it is not needed to use Docker or nginx anymore, at least for basic deployments. Optimizations have also been implemented so that large studies are opened much faster than when using the vanilla DICOMweb interface of OHIF. Full d…

Holakunle

---

<div class="post-metadata">

### Author: ![rishibroto1006](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rishibroto1006](https://discourse.orthanc-server.org/u/rishibroto1006)
#### Post date: [July 19, 2023, 9:12am UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/8 "2023-07-19T09:12:21Z")

</div>

Hello Holakunle,

I have gone through the topic, wherein it mentions that the CORS issue is taken care of by addition of required headers. But the issue still occurs on the osimis/orthanc images, particularly, when it is not being triggered using localhost IP address. Hence, I’m here to discuss on a possible resolution on it.

---

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [July 19, 2023, 2:35pm UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/9 "2023-07-19T14:35:57Z")

</div>

Hi,

I have just added this [Docker sample setup](https://github.com/orthanc-server/orthanc-setup-samples/tree/master/docker/https) to test running Orthanc and OHIF from a remote computer with HTTPS enabled. It seems to work.

If you disable HTTPS, I’m indeed getting the “CORS isolation” error when accessing OHIF from a remote computer and not when accessing OHIF from localhost. To me, this seems like a browser protection feature:

- either you are running in a “trusted environment”: localhost or HTTPS and the browser won’t complain
- if you are accessing a remote site without HTTPS, the browser is more strict.

To me, these limitations come from the use of SharedArrayBuffer in OHIF and they require the same kind of trusted environment ([reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements)).

Hope this helps and clarifies these numerous CORS issues with OHIF.

Best regards,

Alain.

---

<div class="post-metadata">

### Author: ![rishibroto1006](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rishibroto1006](https://discourse.orthanc-server.org/u/rishibroto1006)
#### Post date: [July 20, 2023, 5:34am UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/10 "2023-07-20T05:34:36Z")

</div>

Thank you so much Alain for the clarification. As per my config, I need to run it in a secure environment. Wasn’t aware that OHIF would need a secure environment for MPR to work. I will look into it. Thanks a lot for your guidance.

---

<div class="post-metadata">

### Author: ![rishibroto1006](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rishibroto1006](https://discourse.orthanc-server.org/u/rishibroto1006)
#### Post date: [August 9, 2023, 12:27pm UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/11 "2023-08-09T12:27:03Z")

</div>

Hello,

Thank you for your support. I was able to deploy Orthanc securely and use OHIF. However, when I try to open it using iFrame, it still shows Cross-Origin-Isolation error. When I open it in a separate tab, it works smoothly. Please guide me on this? Any issue with OHIF-Orthanc integration or a bug with OHIF?

---

<div class="post-metadata">

### Author: ![alireza](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alireza/32/1574_2.png) [@alireza](https://discourse.orthanc-server.org/u/alireza)
#### Post date: [August 16, 2023, 1:09pm UTC](https://discourse.orthanc-server.org/t/ohif-inconsistency-with-osimis-orthanc-images/3726/12 "2023-08-16T13:09:37Z")

</div>

cors issues/headers are discussed in depth here [Cross-Origin Information for OHIF | OHIF](https://docs.ohif.org/deployment/cors)
