Viewers: MPR not working on OHIF v3 ("Your page is NOT cross-origin isolated" in console)

On the latest version of OHIF V3 MPR is not working for me.This exact setup works fine with OHIF v2. Im running OHIF in Nginx v1.23.2. Im posting my Nginx config file, OHIF app-config.js contents files below:

Screenshot 2022-11-22 181350

What steps can we follow to reproduce the bug?

  1. Open study from study browser
  2. Click MPR toolbar button

app-config.js

window.config = {
    routerBasename: "/",
    extensions: [],
    modes: [],
    showStudyList: !0,
    maxNumberOfWebWorkers: 4,
    omitQuotationForMultipartRequest: !0,
    showLoadingIndicator: !0,
    maxNumRequests: {
        interaction: 100,
        thumbnail: 75,
        prefetch: 10
    },
    dataSources: [{
        friendlyName: "dcmjs DICOMWeb Server",
        namespace: "@ohif/extension-default.dataSourcesModule.dicomweb",
        sourceName: "dicomweb",
        configuration: {
            name: 'Orthanc',
	    wadoUriRoot: '/orthanc/wado',
	    qidoRoot: '/orthanc/dicom-web',
	    wadoRoot: '/orthanc/dicom-web',
            qidoSupportsIncludeField: !1,
            imageRendering: "wadors",
            thumbnailRendering: "wadors",
            enableStudyLazyLoad: !0,
            supportsFuzzyMatching: !1,
        }
    }, {
        friendlyName: "dicom json",
        namespace: "@ohif/extension-default.dataSourcesModule.dicomjson",
        sourceName: "dicomjson",
        configuration: {
            name: "json"
        }
    }, {
        friendlyName: "dicom local",
        namespace: "@ohif/extension-default.dataSourcesModule.dicomlocal",
        sourceName: "dicomlocal",
        configuration: {}
    }],
    httpErrorHandler: e => {
        console.warn(e.status), console.warn("test, navigate to https://ohif.org/")
    },
    defaultDataSourceName: "dicomweb",
    hotkeys: [{
        commandName: "incrementActiveViewport",
        label: "Next Viewport",
        keys: ["right"]
    }, {
        commandName: "decrementActiveViewport",
        label: "Previous Viewport",
        keys: ["left"]
    }, {
        commandName: "rotateViewportCW",
        label: "Rotate Right",
        keys: ["r"]
    }, {
        commandName: "rotateViewportCCW",
        label: "Rotate Left",
        keys: ["l"]
    }, {
        commandName: "invertViewport",
        label: "Invert",
        keys: ["i"]
    }, {
        commandName: "flipViewportHorizontal",
        label: "Flip Horizontally",
        keys: ["h"]
    }, {
        commandName: "flipViewportVertical",
        label: "Flip Vertically",
        keys: ["v"]
    }, {
        commandName: "scaleUpViewport",
        label: "Zoom In",
        keys: ["+"]
    }, {
        commandName: "scaleDownViewport",
        label: "Zoom Out",
        keys: ["-"]
    }, {
        commandName: "fitViewportToWindow",
        label: "Zoom to Fit",
        keys: ["="]
    }, {
        commandName: "resetViewport",
        label: "Reset",
        keys: ["space"]
    }, {
        commandName: "nextImage",
        label: "Next Image",
        keys: ["down"]
    }, {
        commandName: "previousImage",
        label: "Previous Image",
        keys: ["up"]
    }, {
        commandName: "setToolActive",
        commandOptions: {
            toolName: "Zoom"
        },
        label: "Zoom",
        keys: ["z"]
    }, {
        commandName: "windowLevelPreset1",
        label: "W/L Preset 1",
        keys: ["1"]
    }, {
        commandName: "windowLevelPreset2",
        label: "W/L Preset 2",
        keys: ["2"]
    }, {
        commandName: "windowLevelPreset3",
        label: "W/L Preset 3",
        keys: ["3"]
    }, {
        commandName: "windowLevelPreset4",
        label: "W/L Preset 4",
        keys: ["4"]
    }, {
        commandName: "windowLevelPreset5",
        label: "W/L Preset 5",
        keys: ["5"]
    }, {
        commandName: "windowLevelPreset6",
        label: "W/L Preset 6",
        keys: ["6"]
    }, {
        commandName: "windowLevelPreset7",
        label: "W/L Preset 7",
        keys: ["7"]
    }, {
        commandName: "windowLevelPreset8",
        label: "W/L Preset 8",
        keys: ["8"]
    }, {
        commandName: "windowLevelPreset9",
        label: "W/L Preset 9",
        keys: ["9"]
    }]
};

nginx.conf

worker_processes  1;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    #gzip  on;

    server    {
       
        listen 8099;
        server_name default_server;
       
		location / {
			try_files $uri $uri/ /index.html;
				  }
				  
        location /orthanc/{
            access_log  logs/access.log;
            proxy_pass http://localhost:8042;
            proxy_set_header HOST $Host:8099/orthanc/;
            proxy_set_header X-Real-IP $remote_addr;

            rewrite /orthanc(.*) $1 break;

            add_header 'Access-Control-Allow-Credentials' 'true';
            add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
            add_header 'Access-Control-Allow-Origin' '*';

        }
       
    }

}

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Hi! Yesterday I ran into the same issue. After adding the COEP and the COOP headers, it fixed the problem in Firefox, but Chromium (Version 107.0.5304.110) kept complaining that the workers were still missing headers. After reading a bit on the topic on this page, I realised that workers served with COEP set at require-corp needs to have a Cross-Origin-Resource-Policy explicitly set too. You might want to try adding the following header too:

Cross-Origin-Resource-Policy: same-origin

For me it fixed the issue of the workers in Chrome. Hope that helps!

this seems to have fixed it…thanks

Hi! Yesterday I ran into the same issue. After adding the COEP and the COOP headers, it fixed the problem in Firefox, but Chromium (Version 107.0.5304.110) kept complaining that the workers were still missing headers. After reading a bit on the topic on this page, I realised that workers served with COEP set at require-corp needs to have a Cross-Origin-Resource-Policy explicitly set too. You might want to try adding the following header too:

Cross-Origin-Resource-Policy: same-origin

For me it fixed the issue of the workers in Chrome. Hope that helps!

@pwespi Patrick Thanks!! Worked with https! @Gabsha Gabriel merci bcp pour ton assistance!