aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorJohan Fleury <jfleury@arcaik.net>2021-01-07 16:52:37 -0500
committerChocobozzz <chocobozzz@cpy.re>2021-01-13 09:14:43 +0100
commit12c1e38df2fde0efbf948fa80e2afc4e67f0e8c9 (patch)
tree004d31846c078f6e13622fbf2bf0b28bd0db47ea /server.ts
parentb7085c713220c9c5a96c9bb77330c2ba6ae9274e (diff)
downloadPeerTube-12c1e38df2fde0efbf948fa80e2afc4e67f0e8c9.tar.gz
PeerTube-12c1e38df2fde0efbf948fa80e2afc4e67f0e8c9.tar.zst
PeerTube-12c1e38df2fde0efbf948fa80e2afc4e67f0e8c9.zip
feat: allow administrator to disable logging of ping requests
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server.ts b/server.ts
index e674a09d4..f844c9564 100644
--- a/server.ts
+++ b/server.ts
@@ -158,7 +158,10 @@ morgan.token('user-agent', (req: express.Request) => {
158 return req.get('user-agent') 158 return req.get('user-agent')
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) {
163 return (req.path === '/api/v1/ping' && CONFIG.LOG.LOG_PING_REQUESTS === false)
164 },
162})) 165}))
163 166
164// For body requests 167// For body requests