aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-17 10:55:40 +0200
committerChocobozzz <me@florianbigard.com>2020-06-17 11:42:50 +0200
commitfaa9d434b4d681837ff2a87603337c2623419669 (patch)
tree1f3c798dd6fd5f2dcbb019978f063f448c019974 /server.ts
parent982f2fc9b42537ca40ff29bf62c1ca3692d4b587 (diff)
downloadPeerTube-faa9d434b4d681837ff2a87603337c2623419669.tar.gz
PeerTube-faa9d434b4d681837ff2a87603337c2623419669.tar.zst
PeerTube-faa9d434b4d681837ff2a87603337c2623419669.zip
Update server dependencies
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.ts b/server.ts
index e18e2be5c..1286cf521 100644
--- a/server.ts
+++ b/server.ts
@@ -137,14 +137,14 @@ if (isTestInstance()) {
137} 137}
138 138
139// For the logger 139// For the logger
140morgan.token('remote-addr', req => { 140morgan.token<express.Request>('remote-addr', req => {
141 if (CONFIG.LOG.ANONYMIZE_IP === true || req.get('DNT') === '1') { 141 if (CONFIG.LOG.ANONYMIZE_IP === true || req.get('DNT') === '1') {
142 return anonymize(req.ip, 16, 16) 142 return anonymize(req.ip, 16, 16)
143 } 143 }
144 144
145 return req.ip 145 return req.ip
146}) 146})
147morgan.token('user-agent', req => { 147morgan.token<express.Request>('user-agent', req => {
148 if (req.get('DNT') === '1') { 148 if (req.get('DNT') === '1') {
149 return useragent.parse(req.get('user-agent')).family 149 return useragent.parse(req.get('user-agent')).family
150 } 150 }