Bläddra i källkod

Add authentication to log routes

Matt Coles 9 år sedan
förälder
incheckning
81dc4f7b8f
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      index.js

+ 2 - 2
index.js

59
 app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded
59
 app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded
60
 app.use('/', route_manager);
60
 app.use('/', route_manager);
61
 app.use('/source', require('magic-window')('/source', { ignore: ['config', 'redis', 'cert.pem', 'key.pem', 'dump.rdb'] }))
61
 app.use('/source', require('magic-window')('/source', { ignore: ['config', 'redis', 'cert.pem', 'key.pem', 'dump.rdb'] }))
62
-app.use('/log', express.static('log'));
63
-app.use('/log', serveIndex('log', {'icons': true}));
62
+app.use('/log', auth, express.static('log'));
63
+app.use('/log', auth, serveIndex('log', {'icons': true}));
64
 
64
 
65
 app.listen(3000, function () {
65
 app.listen(3000, function () {
66
   console.log('Now accepting connections on port 3000.');
66
   console.log('Now accepting connections on port 3000.');