mirror of
https://github.com/Foltik/Shimapan
synced 2025-01-05 15:58:03 -05:00
Add conditional http logging
This commit is contained in:
parent
d3e72f332d
commit
76f6bbbc0d
@ -32,6 +32,7 @@
|
||||
"limit": 5
|
||||
},
|
||||
"Log": {
|
||||
"http": true,
|
||||
"httpLevel": "combined"
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
"path": "uploads"
|
||||
},
|
||||
"Log": {
|
||||
"httpLevel": "dev"
|
||||
"http": false
|
||||
},
|
||||
"User": {
|
||||
"Password": {
|
||||
|
@ -29,7 +29,8 @@ const MongoStore = require('connect-mongo')(session);
|
||||
const mongoStore = new MongoStore({url: dbHost});
|
||||
|
||||
// HTTP Request Logging
|
||||
app.use(morgan(config.get('Log.httpLevel')));
|
||||
if (config.get('Log.http'))
|
||||
app.use(morgan(config.get('Log.httpLevel')));
|
||||
|
||||
// Session setup
|
||||
app.use(helmet());
|
||||
|
Loading…
Reference in New Issue
Block a user