Add trustProxy option to server config
parent
97fc02a543
commit
a925393522
|
|
@ -50,6 +50,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 : '',
|
||||
// If this is set to true, only signed-in users will be able
|
||||
// to join a room directly. Non-signed-in users (guests) will
|
||||
// always be put in the lobby regardless of room lock status.
|
||||
|
|
|
|||
|
|
@ -99,6 +99,10 @@ const session = expressSession({
|
|||
}
|
||||
});
|
||||
|
||||
if (config.trustProxy) {
|
||||
app.set('trust proxy', config.trustProxy);
|
||||
}
|
||||
|
||||
app.use(session);
|
||||
|
||||
passport.serializeUser((user, done) =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue