diff --git a/server/src/index.ts b/server/src/index.ts index 0598e50..676b960 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -58,11 +58,11 @@ const app = new Elysia() .use( cors({ 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 ); // TODO fix this }, - allowedHeaders: "Origin, X-Requested-With, Content-Type, Accept", + allowedHeaders: "Origin, X-Requested-With, Content-Type, Accept, Cookie", }) ) .use(