mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
nolog ip ignoring empty lines in file, fixing checking
This commit is contained in:
parent
b7dc475cd4
commit
34cd2f25d6
3 changed files with 6 additions and 3 deletions
|
@ -79,7 +79,7 @@ function LogReq (req, toFile, sc) {
|
|||
let ip = req.headers['cf-connecting-ip'] || req.connection.remoteAddress
|
||||
|
||||
let nolog = noLogips.some((x) => {
|
||||
return x.includes(ip)
|
||||
return ip.includes(x)
|
||||
})
|
||||
if (nolog) {
|
||||
return
|
||||
|
@ -118,6 +118,9 @@ function parseNoLogFile (newData) {
|
|||
if (noLogips[noLogips.length - 1] === '') {
|
||||
noLogips.pop()
|
||||
}
|
||||
noLogips = noLogips.filter((x) => {
|
||||
return x !== ''
|
||||
})
|
||||
Log('\tNo Log IP-s changed: ' + noLogips.join(', '))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue