mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
express: Move preAuthorize
middleware before express-session
This commit is contained in:
parent
bf35dcfc50
commit
0b1ec20c5c
1 changed files with 2 additions and 2 deletions
|
@ -201,11 +201,11 @@ exports.restartServer = async () => {
|
|||
secure: 'auto',
|
||||
},
|
||||
});
|
||||
app.use(exports.sessionMiddleware);
|
||||
|
||||
app.use(cookieParser(settings.sessionKey, {}));
|
||||
// If webaccess.preAuthorize explicitly grants access, webaccess.checkAccess will skip all checks.
|
||||
app.use(webaccess.preAuthorize);
|
||||
app.use(exports.sessionMiddleware);
|
||||
app.use(cookieParser(settings.sessionKey, {}));
|
||||
app.use(webaccess.checkAccess);
|
||||
|
||||
await Promise.all([
|
||||
|
|
Loading…
Reference in a new issue