Removed ip address logging

This commit is contained in:
mrfry 2021-05-09 09:45:37 +02:00
parent c1feb28f86
commit 168a36b538
6 changed files with 17 additions and 27 deletions

View file

@ -102,11 +102,11 @@ function expandWithSpaces(text, count) {
function LogReq(req: Request, toFile?: boolean, statusCode?: string): void {
try {
let ip: any =
const ip: any =
req.headers['cf-connecting-ip'] || req.connection.remoteAddress
if (!toFile) {
ip = expandWithSpaces(ip, 39)
}
// if (!toFile) {
// ip = expandWithSpaces(ip, 39)
// }
const nolog = noLogips.some((noLogip) => {
return ip.includes(noLogip)
})
@ -114,7 +114,7 @@ function LogReq(req: Request, toFile?: boolean, statusCode?: string): void {
return
}
let logEntry = logHashed(ip)
let logEntry = '' // logHashed(ip)
let dl = DELIM
if (req.url.includes('lred')) {
dl += C('red')