Closed lolaswift closed 3 years ago
You can add these headers in a custom middleware:
// fiveserver.config.cjs
const customHeaders = (req, res, next) => {
res.header('Cross-Origin-Opener-Policy', 'same-origin')
res.header('Cross-Origin-Embedder-Policy', 'require-corp')
next()
}
module.exports = {
middleware: [customHeaders],
// other settings
}
Or do you think it should be the default?
@yandeu You're awesome! It's working. Like this it's good enough since it's so easy to add it to any workplace. Fiveserver is the best among all similar expansions.Thank you for sharing it with the world.
Describe the bug Because these are new security requirements for using SharedArrayBuffer. Running on localhost will get the Uncaught ReferenceError: SharedArrayBuffer is not defined.
Need to set two response headers :
Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp
Have a question? Join the discussions instead.