aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
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 e2ff6327b..6963bbf23 100644
--- a/server.ts
+++ b/server.ts
@@ -142,14 +142,14 @@ if (isTestInstance()) {
142} 142}
143 143
144// For the logger 144// For the logger
145morgan.token('remote-addr', req => { 145morgan.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})
152morgan.token('user-agent', req => { 152morgan.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 }