View in #help on Slack
@suneetha_j: Hi, could anyone help me out ? I am embedding the viewer in an iframe in my application.I tried adding server {
location / {
add_header Cross-Origin-Opener-Policy *;
add_header Cross-Origin-Embedder-Policy require-corp;
}
} but still I am getting your page is not cross-origin isloated error in my application
@Alireza_Sedghi: have you seen this https://docs.ohif.org/deployment/cors
Cross-Origin Information for OHIF | OHIF
@suneetha_j: yes I followed the same, Do i need to have this setup :
const express = require(“express”)
const app = express()
app.use((req, res, next) => {
res.setHeader(“Cross-Origin-Opener-Policy”, “same-origin”)
res.setHeader(“Cross-Origin-Embedder-Policy”, “require-corp”)
next()
})
app.use(express.static(“public”)) // ‘public’ should be the folder with the static OHIF build files
app.listen(8080, () => console.log(“Listening on port 8080!”))
for embedding iframe in a react application ?
@Alireza_Sedghi: I think you need that