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:
Submodule public/moodle-test-userscript updated: 13de491da0...fe74436ab1
@@ -79,7 +79,7 @@ function LogReq (req, toFile, sc) {
|
|||||||
let ip = req.headers['cf-connecting-ip'] || req.connection.remoteAddress
|
let ip = req.headers['cf-connecting-ip'] || req.connection.remoteAddress
|
||||||
|
|
||||||
let nolog = noLogips.some((x) => {
|
let nolog = noLogips.some((x) => {
|
||||||
return x.includes(ip)
|
return ip.includes(x)
|
||||||
})
|
})
|
||||||
if (nolog) {
|
if (nolog) {
|
||||||
return
|
return
|
||||||
@@ -118,6 +118,9 @@ function parseNoLogFile (newData) {
|
|||||||
if (noLogips[noLogips.length - 1] === '') {
|
if (noLogips[noLogips.length - 1] === '') {
|
||||||
noLogips.pop()
|
noLogips.pop()
|
||||||
}
|
}
|
||||||
|
noLogips = noLogips.filter((x) => {
|
||||||
|
return x !== ''
|
||||||
|
})
|
||||||
Log('\tNo Log IP-s changed: ' + noLogips.join(', '))
|
Log('\tNo Log IP-s changed: ' + noLogips.join(', '))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Submodule utils/question-classes updated: 100ca7750d...0cfd9cfda3
Reference in New Issue
Block a user