diff options
| author | Sean Fridman <fridman@mail.sfsu.edu> | 2015-07-03 11:55:40 -0400 |
|---|---|---|
| committer | Sean Fridman <fridman@mail.sfsu.edu> | 2015-07-03 11:57:40 -0400 |
| commit | 9be28b4322a629b8fe7c35e8cdc42eb413c6d84a (patch) | |
| tree | 162abf8e2504cc0aff001502192970519d3cd15c /app/node_modules/okadminview/index.js | |
| parent | e42a871b1a041ad68f6316aa1d50d1e7fe741123 (diff) | |
Protect admin root path with authentication as wellv0.1.11
Fixes #5
Diffstat (limited to 'app/node_modules/okadminview/index.js')
| -rw-r--r-- | app/node_modules/okadminview/index.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/node_modules/okadminview/index.js b/app/node_modules/okadminview/index.js index 2a0fcd5..f6a7cdb 100644 --- a/app/node_modules/okadminview/index.js +++ b/app/node_modules/okadminview/index.js @@ -118,7 +118,9 @@ function OKAdminView(options) { // This should really be mounted on the router, but can't be due to // https://github.com/jaredhanson/passport-http/pull/16 app.use('/admin/', passport.initialize()); - app.all('/admin/:path*', passport.authenticate('digest', {session: false})); + app.all('/admin/(:path*)?', passport.authenticate('digest', { + session: false + })); router.get('/', function readIndex(req, res, next) { fetchIndexTemplateData(meta, indexQueries).then(function(data) { |
