mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
Don't block static paths with http auth
This commit is contained in:
parent
3dd24bdf6f
commit
362ef454b8
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,11 @@ exports.basicAuth = function (req, res, next) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Do not require auth for static paths...this could be a bit brittle
|
||||||
|
else if (req.path.match(/^\/(static|javascripts|pluginfw)/)) {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Otherwise return Auth required Headers, delayed for 1 second, if auth failed.
|
// Otherwise return Auth required Headers, delayed for 1 second, if auth failed.
|
||||||
res.header('WWW-Authenticate', 'Basic realm="Protected Area"');
|
res.header('WWW-Authenticate', 'Basic realm="Protected Area"');
|
||||||
|
|
Loading…
Reference in a new issue