This commit is contained in:
parent
86cf57a103
commit
351e5e64c0
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue