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