Cannot change BulkDataURI with Host or Fowarded HTTP header

Hi all,

I’m facing a problem with the DICOMWeb plugin.

I running the DICOMWeb on Orthanc that is reached through a reverse proxy.

The DICOM web metadata answer return in the field the BulkDataURI

Following the Orthanc Book I wanted that value to return the value of the Php revese proxy server rather than the Orthanc real server. The documentation says the Host DicomWeb is depreciated since the Host value is got from the Host or Forwarded HTTP header.

I tried to set the Host value using this header without success.

The Orthanc server correctly recieve the HTTP header, I put a lua script printing the HTTP header recieved by orthanc and I see in the console :

23:25:25 OrthancPacs[1575]: W0403 21:25:25.132665 LuaContext.cpp:104] Lua says: [host], string, sassa.fr

But the recieved answer of a DICOM-Web metadata API such as :
http://localhost:8042/dicom-web/studies/1.2.276.0.7230010.3.1.2.330040320.1.1585939403.785555/series/1.2.276.0.7230010.3.1.3.330040320.1.1585939406.786579/metadata

still answer

“04000520”: {
“BulkDataURI”: “https://localhost:8042/orthanc/dicom-web/studies/1.2.276.0.7230010.3.1.2.330040320.1.1585939403.785555/series/1.2.276.0.7230010.3.1.3.330040320.1.1585939406.786579/instances/1.2.276.0.7230010.3.1.4.330040320.1.1585939409.787279/bulk/04000500/1/04000520”,
“vr”: “OB”
}

On the other hand if I put the value in the “Host” parameter of DicomWeb options as the depreciated option the BulkDataURI is correctly rewriten using my custom host.

Souds like the depreciated options is still the used parameter ? Or just i’m missing something ?

Best regards,

Salim

Oops, maybe this is side effect of Osimis Docker parameter,

I’m using Osimis images and it seems that Osimis is using dicomweb host default value as “localhost”.
https://osimis.atlassian.net/wiki/spaces/OKB/pages/26738689/How+to+use+osimis+orthanc+Docker+images#Howtouseosimis/orthancDockerimages?-DICOMweb

So the image is using the depreciated parameter.
Looking at DicomWeb code if this depriciated parameter is set, the HTTP header is not analyzed.

So it sounds it is a bug in Osimis docker Env variable by using a default value for DICOMWeb Host it prevent to use the dynamically set Http header value.

Sorry for flood, last informations,

I try to override to Osimis Docker by setting a empty string in the “Host” parameter of DicomWeb, but still I have failed to get my Host / Forwarded header to be considered by DicomWeb.

Hello Salim,

Please could you confirm that the issue is only present in the “osimis/orthanc” Docker images?
https://osimis.atlassian.net/wiki/spaces/OKB/pages/26738689/How+to+use+osimis+orthanc+Docker+images

If you use the basic “jodogne/orthanc-plugins” Docker image, or if you compile Orthanc by yourself, do the configuration options of the DICOMweb plugin work as expected?
https://book.orthanc-server.com/plugins/dicomweb.html#server-related-options

Regards,
Sébastien-

Dear Sebastien

Yes it works well with the Orthanc Standalone version.

For Osimis Docker, I was using the 19 branch and I was unable to desactivate the "Host" parameter by injecting an empty string to let DicomWeb use the host header.
However in the last version 20.3.0 I can override the Host with an empty string and thus Orthanc works properly by setting the host given in the header (Or maybe I did update the config JSON in the 19 branch and forget to rebuild the container with new settings).

However the problem is not in Orthanc but rather in it's Osimis Docker distribution.

Few weeks ago I also figured that some options were missing in Osimis Docker Image
https://groups.google.com/forum/#!topic/orthanc-users/2WNjtBZAehc

Probably the time of a refresh of this Orthanc Docker image^^

Sorry for disturbing,

Best regards,

Salim

Hi Salim,

Indeed, there are few small issues in the osimis/orthanc images right now.
We’re currently investigating a way to refactor the images so we can include all parameters and have images that would be easier to maintain…

In the meantime, I would encourage you to use a json file for the dicom-web configuration as shown in this exemple: https://bitbucket.org/osimis/orthanc-setup-samples/src/05f51bbbc55aadcc0746da543ed41a13dbb47062/docker/dicom-web/.

Best regards,

Alain