who would've thought embeds were this annoying
This commit is contained in:
parent
be74a7eb58
commit
a4c5203961
@ -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);
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user