X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server.ts;h=b307e67a1df71ee2924f2f492bd40db69c85770e;hb=490b595a01c5824ff63ffb87f0efdfca95f4bf3b;hp=f6794b89783536bf044e58858a335d3370e4ceb2;hpb=d5b7d9110dd637a7f67ce9e430145314812a8df1;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server.ts b/server.ts index f6794b897..b307e67a1 100644 --- a/server.ts +++ b/server.ts @@ -48,6 +48,9 @@ if (errorMessage !== null) { throw new Error(errorMessage) } +// Trust our proxy (IP forwarding...) +app.set('trust proxy', CONFIG.TRUST_PROXY) + // ----------- Database ----------- // Initialize database and models @@ -81,6 +84,7 @@ if (isTestInstance()) { ) { return (cors({ origin: 'http://localhost:3000', + exposedHeaders: 'Retry-After', credentials: true }))(req, res, next) }