This commit is contained in:
parent
e3cefafd66
commit
51b720672b
|
@ -40,7 +40,7 @@ export default new Elysia({
|
||||||
if (context.request.method !== "GET") {
|
if (context.request.method !== "GET") {
|
||||||
const originHeader = context.request.headers.get("Origin");
|
const originHeader = context.request.headers.get("Origin");
|
||||||
// NOTE: You may need to use `X-Forwarded-Host` instead
|
// NOTE: You may need to use `X-Forwarded-Host` instead
|
||||||
const hostHeader = context.request.headers.get("Host");
|
const hostHeader = context.request.headers.get(process.env.ENV == "production" ? "X-Forwarded-Host" : "Host");
|
||||||
if (
|
if (
|
||||||
!originHeader ||
|
!originHeader ||
|
||||||
!hostHeader ||
|
!hostHeader ||
|
||||||
|
|
Loading…
Reference in a new issue