Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding basic auth to web ui

  • Loading branch information...
commit 825e05adfb7a946c04f70332dac2fd58c397bf1f 1 parent 03c62c3
@rgarcia rgarcia authored
Showing with 10 additions and 6 deletions.
  1. +10 −6 lib/http/index.js
16 lib/http/index.js
@@ -65,9 +65,13 @@'/job', provides('json'), express.bodyParser(), json.createJob);
// routes
+var auth = function(req, res, next) {
+ if (!app.settings.auth) return next();
+ express.basicAuth(app.settings.auth[0], app.settings.auth[1])(req,res,next);
+app.get('/', auth,'active'));
+app.get('/active', auth,'active'));
+app.get('/inactive', auth,'inactive'));
+app.get('/failed', auth,'failed'));
+app.get('/complete', auth,'complete'));
+app.get('/delayed', auth,'delayed'));
Please sign in to comment.
Something went wrong with that request. Please try again.