We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afdcfe6 commit ac0ae8eCopy full SHA for ac0ae8e
server/previewServer.js
@@ -55,7 +55,12 @@ const corsMiddleware = cors({
55
credentials: true,
56
origin: allowedCorsOrigins
57
});
58
-app.use(corsMiddleware);
+// app.use(corsMiddleware);
59
+app.use((req, res, next) => {
60
+ res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
61
+ res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
62
+ corsMiddleware(req, res, next);
63
+});
64
// Enable pre-flight OPTIONS route for all end-points
65
app.options('*', corsMiddleware);
66
0 commit comments