aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-13 09:38:19 +0100
committerChocobozzz <me@florianbigard.com>2021-01-13 09:38:19 +0100
commit78d62f4d182be2f72f4901c38a0d10bb147896e8 (patch)
treed68b591387a526b235311fc5ec3a2d6f871a071b /server.ts
parent9bb720f3f96d781d5e132220ace4515e779cea3c (diff)
downloadPeerTube-78d62f4d182be2f72f4901c38a0d10bb147896e8.tar.gz
PeerTube-78d62f4d182be2f72f4901c38a0d10bb147896e8.tar.zst
PeerTube-78d62f4d182be2f72f4901c38a0d10bb147896e8.zip
Fix and add skipping ping log tests
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/server.ts b/server.ts
index f844c9564..e3cddfd33 100644
--- a/server.ts
+++ b/server.ts
@@ -159,9 +159,7 @@ morgan.token('user-agent', (req: express.Request) => {
159}) 159})
160app.use(morgan('combined', { 160app.use(morgan('combined', {
161 stream: { write: logger.info.bind(logger) }, 161 stream: { write: logger.info.bind(logger) },
162 skip: function (req, res) { 162 skip: req => CONFIG.LOG.LOG_PING_REQUESTS === false && req.originalUrl === '/api/v1/ping'
163 return (req.path === '/api/v1/ping' && CONFIG.LOG.LOG_PING_REQUESTS === false)
164 },
165})) 163}))
166 164
167// For body requests 165// For body requests