mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
webaccess: Move preAuthorize
to its own middleware
This commit is contained in:
parent
7f3d0e71f7
commit
bf35dcfc50
2 changed files with 71 additions and 47 deletions
|
@ -204,6 +204,8 @@ exports.restartServer = async () => {
|
|||
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(webaccess.checkAccess);
|
||||
|
||||
await Promise.all([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue