diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-17 10:55:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-17 11:42:50 +0200 |
commit | faa9d434b4d681837ff2a87603337c2623419669 (patch) | |
tree | 1f3c798dd6fd5f2dcbb019978f063f448c019974 /server.ts | |
parent | 982f2fc9b42537ca40ff29bf62c1ca3692d4b587 (diff) | |
download | PeerTube-faa9d434b4d681837ff2a87603337c2623419669.tar.gz PeerTube-faa9d434b4d681837ff2a87603337c2623419669.tar.zst PeerTube-faa9d434b4d681837ff2a87603337c2623419669.zip |
Update server dependencies
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -137,14 +137,14 @@ if (isTestInstance()) { | |||
137 | } | 137 | } |
138 | 138 | ||
139 | // For the logger | 139 | // For the logger |
140 | morgan.token('remote-addr', req => { | 140 | morgan.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 | }) |
147 | morgan.token('user-agent', req => { | 147 | morgan.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 | } |