who would've thought embeds were this annoying

This commit is contained in:
Erik 2022-03-22 22:40:26 +02:00
parent be74a7eb58
commit a4c5203961
No known key found for this signature in database
GPG Key ID: FEFF4B220DDF5589
2 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,7 @@ class Client extends EventEmitter {
this.app.use(cors({ this.app.use(cors({
origin: (origin, cb) => { origin: (origin, cb) => {
if (!origin) return cb(null, true); 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(null, true);
} }
return cb('Unauthorised origin', false); return cb('Unauthorised origin', false);

View File

@ -32,6 +32,7 @@ class Home extends Endpoint {
async get(req, res) { async get(req, res) {
res.set('Cross-Origin-Embedder-Policy', 'credentialless');
const home = path.resolve(this.client.baseDirectory, '../client/build/index.html'); const home = path.resolve(this.client.baseDirectory, '../client/build/index.html');
res.sendFile(home); res.sendFile(home);