mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
Merge pull request #1938 from licy183/fix-logger
This commit is contained in:
commit
fe98f63149
1 changed files with 6 additions and 0 deletions
6
app.js
6
app.js
|
@ -63,8 +63,14 @@ if (!config.useSSL && config.protocolUseSSL) {
|
|||
app.set('trust proxy', 1)
|
||||
}
|
||||
|
||||
// check if the request is from container healthcheck
|
||||
function isContainerHealthCheck (req, _) {
|
||||
return req.headers['user-agent'] === 'hedgedoc-container-healthcheck/1.0' && req.ip === '127.0.0.1'
|
||||
}
|
||||
|
||||
// logger
|
||||
app.use(morgan('combined', {
|
||||
skip: isContainerHealthCheck,
|
||||
stream: logger.stream
|
||||
}))
|
||||
|
||||
|
|
Loading…
Reference in a new issue