slim icon indicating copy to clipboard operation
slim copied to clipboard

Handle http answers after https requests

Open maxfscher opened this issue 1 year ago • 7 comments

Dear all,

we are recently experiencing an issue regarding the url that is used by the SLIM viewer to retrieve images from a DCM4CHEE PACS server. The problem is expressed as follows: The Slim Viewer is able to communicate with the DCM4CHEE pacs and extracts metadata of image series correctly. However, it fails to extract the requested pixel data and we get a view of the viewer that is similar to issue #142 . We get an error message that indicates a mixed content problem, as shown in the attached image. Screenshot from 2023-06-27 13-27-08 In the Network tab from the browser we can see, that the initial request from the viewer to the DCM4CHEE PACS was done via https, Screenshot from 2023-06-27 13-26-04

which we also configure in the local.js file

var hostname=window.location.href.split("//")[1].split("/")[0]
console.log("Hostname: "+hostname)
window.config = {
  path: "/slim",
  /** This is an array, but we'll only use the first entry for now */
  servers: [
    {
      id: "local",
      url: "https://"+hostname+"/dcm4chee-arc/aets/KAAPANA/rs",
      write: true
    }
  ],

The PACS answers then via http and the connection is aborted due to an unsecure connection, which is also reasonable since mixed origin requests indicate unsecure connections. Screenshot from 2023-06-27 13-26-32 We are having a pre-build container with SLIM version 0.4.1 lying around, which we integrated to the PACS server via the same local.js as config file and here everything works super fine with the connection to the PACS server. From the logs we have seen that the error is thrown by DicomWebClient, which is installed as default by SLIM with version 0.8.4. A manual downgrade of the DicomWebClient, to 0.8.2, which was used for SLIM 0.4.1 (the version that works for us), did not help. Are there any other approaches to handle such unsecure connections and automatically transfer them into a secure connection by converting the http request into a https request?

maxfscher avatar Jun 27 '23 12:06 maxfscher