fix this shi
All checks were successful
/ build (push) Successful in 15s

This commit is contained in:
Soph :3 2024-05-23 17:44:06 +03:00
parent 86cf57a103
commit 351e5e64c0
Signed by: sophie
GPG key ID: EDA5D222A0C270F2

View file

@ -58,11 +58,11 @@ const app = new Elysia()
.use( .use(
cors({ cors({
origin: (context) => { origin: (context) => {
return /(http(|s):\/\/|)(sad\.ovh|127\.0\.0\.1|localhost)(:\d{1,4}|)(\/|)/gm.test( return /^(http(|s):\/\/|)(api\.chat\.sad\.ovh|sad\.ovh|127\.0\.0\.1|localhost)(:\d{1,4}|)(\/|)$/gm.test(
context.url context.url
); // TODO fix this ); // TODO fix this
}, },
allowedHeaders: "Origin, X-Requested-With, Content-Type, Accept", allowedHeaders: "Origin, X-Requested-With, Content-Type, Accept, Cookie",
}) })
) )
.use( .use(