diff options
author | Marcel Klehr <mklehr@gmx.net> | 2012-12-05 14:04:48 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2012-12-05 14:04:48 +0100 |
commit | 377ff1eadeed90bd1295597df996a575840254c9 (patch) | |
tree | 9dba59f42fe2cdf7c89de0e85361ec113d2bb059 | |
parent | ce710026443089e69501bd8595ba425209739eaf (diff) | |
download | etherpad-lite-377ff1eadeed90bd1295597df996a575840254c9.zip |
Fix #1219: Make api work if requireAuth is enabled
-rw-r--r-- | src/node/hooks/express/webaccess.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node/hooks/express/webaccess.js b/src/node/hooks/express/webaccess.js index 41bf3880..50323ef6 100644 --- a/src/node/hooks/express/webaccess.js +++ b/src/node/hooks/express/webaccess.js @@ -15,8 +15,8 @@ exports.basicAuth = function (req, res, next) { } var authorize = function (cb) { - // Do not require auth for static paths...this could be a bit brittle - if (req.path.match(/^\/(static|javascripts|pluginfw)/)) return cb(true); + // Do not require auth for static paths and the API...this could be a bit brittle + if (req.path.match(/^\/(static|javascripts|pluginfw|api)/)) return cb(true); if (req.path.indexOf('/admin') != 0) { if (!settings.requireAuthentication) return cb(true); |