Merge pull request #630 from jhollinger/develop

Don't require http auth for static paths
This commit is contained in:
John McLear 2012-04-13 07:51:02 -07:00
commit cba2c1f83a
1 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,11 @@ exports.basicAuth = function (req, res, 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.
res.header('WWW-Authenticate', 'Basic realm="Protected Area"');