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