updated nano to use secure couchdb
This commit is contained in:
parent
3937db3284
commit
bd7bedae9f
1
htpasswd.txt
Normal file
1
htpasswd.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
martind2000:ae7dfe3f3ba4d1132f8c7d7e5a2d05676127458a8842b9c28cea7662ad45393c
|
@ -8,8 +8,20 @@ var express = require('express'), path = require('path'), http = require('http')
|
|||||||
loggerHandler = require('./server/loggerhandler')
|
loggerHandler = require('./server/loggerhandler')
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
var authentication =require('basic-authentication');
|
||||||
|
|
||||||
|
|
||||||
var app = express();
|
var app = express();
|
||||||
|
|
||||||
|
app.use(authentication(({
|
||||||
|
hash: 'sha256', // type of hash
|
||||||
|
file: 'htpasswd.txt', // path of file
|
||||||
|
suppress: true // suppress throwing Error if wrong user
|
||||||
|
})));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
app.set('port', process.env.PORT || 8027);
|
app.set('port', process.env.PORT || 8027);
|
||||||
app.set('views', path.join(__dirname, 'views'));
|
app.set('views', path.join(__dirname, 'views'));
|
||||||
app.set('view engine', 'ejs');
|
app.set('view engine', 'ejs');
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"basic-authentication": "^1.6.2",
|
||||||
"body-parser": "^1.15.0",
|
"body-parser": "^1.15.0",
|
||||||
"cheerio": "^0.20.0",
|
"cheerio": "^0.20.0",
|
||||||
"cookie-parser": "^1.4.1",
|
"cookie-parser": "^1.4.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user