diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -142,14 +142,14 @@ if (isTestInstance()) { | |||
142 | } | 142 | } |
143 | 143 | ||
144 | // For the logger | 144 | // For the logger |
145 | morgan.token('remote-addr', req => { | 145 | morgan.token('remote-addr', (req: express.Request) => { |
146 | if (CONFIG.LOG.ANONYMIZE_IP === true || req.get('DNT') === '1') { | 146 | if (CONFIG.LOG.ANONYMIZE_IP === true || req.get('DNT') === '1') { |
147 | return anonymize(req.ip, 16, 16) | 147 | return anonymize(req.ip, 16, 16) |
148 | } | 148 | } |
149 | 149 | ||
150 | return req.ip | 150 | return req.ip |
151 | }) | 151 | }) |
152 | morgan.token('user-agent', req => { | 152 | morgan.token('user-agent', (req: express.Request) => { |
153 | if (req.get('DNT') === '1') { | 153 | if (req.get('DNT') === '1') { |
154 | return useragent.parse(req.get('user-agent')).family | 154 | return useragent.parse(req.get('user-agent')).family |
155 | } | 155 | } |