Introduction
Introduction Statistics Contact Development Disclaimer Help
WIP - seedlinux - Torrent indexing tool opensource torrents with share ratio's …
Log
Files
Refs
README
---
commit 6abec87f2b1c3a629d3fe242e3cc64f6b025d7b4
parent 0c944b596f6d285a714fe2395f1eb292f20a0056
Author: Jay Scott <[email protected]>
Date: Fri, 7 Jul 2017 13:24:06 +0100
WIP
Diffstat:
M app.js | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/app.js b/app.js
@@ -22,6 +22,7 @@ db.on('error', console.error.bind(console, 'MongoDB connectio…
const app = express();
+// Enable basic security but disable 'Strict-Transport-Security'
app.use(helmet({
hsts: false
}));
@@ -29,6 +30,7 @@ app.use(helmet({
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');
+// disable the logger in production
if (app.get('env') !== 'production') {
app.use(logger('dev'));
}
@@ -38,6 +40,7 @@ app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(express.static(path.join(__dirname, 'public')));
+// setup the DB
app.use(function(req,res,next){
req.db = db;
next();
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.