From a4c520396130a8052311a497b90ea66a62c8ec95 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 22 Mar 2022 22:40:26 +0200 Subject: [PATCH] who would've thought embeds were this annoying --- server/src/client/ServerClient.js | 2 +- server/src/client/endpoints/Home.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/client/ServerClient.js b/server/src/client/ServerClient.js index aa63bd5..8848d3d 100644 --- a/server/src/client/ServerClient.js +++ b/server/src/client/ServerClient.js @@ -75,7 +75,7 @@ class Client extends EventEmitter { this.app.use(cors({ origin: (origin, cb) => { if (!origin) return cb(null, true); - if (['corgi.wtf', 'localhost', 'youtube.com'].some((x) => origin.includes(x))) { + if (['corgi.wtf', 'localhost'].some((x) => origin.includes(x))) { return cb(null, true); } return cb('Unauthorised origin', false); diff --git a/server/src/client/endpoints/Home.js b/server/src/client/endpoints/Home.js index c9c7aaa..5394bd0 100644 --- a/server/src/client/endpoints/Home.js +++ b/server/src/client/endpoints/Home.js @@ -32,6 +32,7 @@ class Home extends Endpoint { async get(req, res) { + res.set('Cross-Origin-Embedder-Policy', 'credentialless'); const home = path.resolve(this.client.baseDirectory, '../client/build/index.html'); res.sendFile(home);