trust proxy
This commit is contained in:
parent
12d1347a06
commit
d8a66b7d45
|
@ -1,5 +1,6 @@
|
|||
import { setupAllProviders } from "./lib/delivery/index.js";
|
||||
import { app as Express } from "./lib/express.js";
|
||||
import { oidc } from "./lib/oidc.js";
|
||||
|
||||
if (typeof process.env.SESSION_SECRET !== "string") {
|
||||
throw new Error("SESSION_SECRET is not defined");
|
||||
|
@ -32,6 +33,11 @@ if (process.env.NODE_ENV === "production") {
|
|||
if (typeof process.env.OIDC_COOKIE_KEYS_FILE !== "string") {
|
||||
throw new Error("OIDC_COOKIE_KEYS_FILE is not defined");
|
||||
}
|
||||
|
||||
if (!process.env.USE_INSECURE) {
|
||||
oidc.proxy = true;
|
||||
Express.enable("trust proxy");
|
||||
}
|
||||
}
|
||||
|
||||
setupAllProviders().then((providers) => {
|
||||
|
|
Loading…
Reference in New Issue