diff options
author | Chocobozzz <me@florianbigard.com> | 2021-01-13 09:38:19 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-01-13 09:38:19 +0100 |
commit | 78d62f4d182be2f72f4901c38a0d10bb147896e8 (patch) | |
tree | d68b591387a526b235311fc5ec3a2d6f871a071b /server.ts | |
parent | 9bb720f3f96d781d5e132220ace4515e779cea3c (diff) | |
download | PeerTube-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.ts | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -159,9 +159,7 @@ morgan.token('user-agent', (req: express.Request) => { | |||
159 | }) | 159 | }) |
160 | app.use(morgan('combined', { | 160 | app.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 |