MPR not working on OHIF v3 ("Your page is NOT cross-origin isolated" in console)
See original GitHub issueOn 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:
What steps can we follow to reproduce the bug?
- Open study from study browser
- 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' '*';
}
}
}
Issue Analytics
- State:
- Created 10 months ago
- Comments:15
Top Results From Across the Web
MPR not working on OHIF v3 ("Your page is NOT cross-origin ...
On the latest version of OHIF V3 MPR is not working for me.This exact setup works fine with OHIF v2. Im running OHIF...
Read more >OHIF v3 not working if served from non root folder #2769
Hi there, I'm trying to build OHIF v3, i'm taking the source code from v3-stable branch, When i follow the build instruction yarn...
Read more >A guide to enable cross-origin isolation - web.dev
Cross-origin isolation enables a web page to use powerful features such as SharedArrayBuffer. This article explains how to enable ...
Read more >DicomWeb CORS Error Loading Image in OHIF - Google Groups
This works as expected and stores the instances in S3. The problem occurs when I attempt to integrate the OHIF Viewer with this...
Read more >Enable and debug cross-origin isolated - YouTube
To mitigate the risk of side-channel attacks, browsers offer an opt-in-based isolated environment called cross-origin isolated.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:For me it fixed the issue of the workers in Chrome. Hope that helps!