diff options
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 | } |