Add trustProxy option to server config

auto_join_3.3
Mészáros Mihály 2020-03-28 21:43:25 +01:00
parent 9da1afd4af
commit 9065996abd
2 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,12 @@ module.exports =
// listeningRedirectPort disabled
// use case: loadbalancer backend
httpOnly : false,
// WebServer/Express trust proxy config for httpOnly mode
// You can find more info:
// - https://expressjs.com/en/guide/behind-proxies.html
// - https://www.npmjs.com/package/proxy-addr
// use case: loadbalancer backend
trustProxy : '',
// This function will be called on successful login through oidc.
// Use this function to map your oidc userinfo to the Peer object.
// The roomId is equal to the room name.

View File

@ -100,6 +100,10 @@ const session = expressSession({
}
});
if (config.trustProxy) {
app.set('trust proxy', config.trustProxy);
}
app.use(session);
passport.serializeUser((user, done) =>