mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Logging data editor module reuqests
This commit is contained in:
Submodule modules/dataEditor/qmining-data-editor updated: 9e92b5d587...30c1fb3f35
Submodule modules/qmining/qmining-page updated: aaf4f82ec4...3e7178f693
@@ -72,9 +72,16 @@ app.use(function (req, res, next) {
|
|||||||
}
|
}
|
||||||
let ip = req.headers['cf-connecting-ip'] || req.connection.remoteAddress
|
let ip = req.headers['cf-connecting-ip'] || req.connection.remoteAddress
|
||||||
logger.LogReq(req, true, res.statusCode)
|
logger.LogReq(req, true, res.statusCode)
|
||||||
|
|
||||||
let toLog = loggableKeywords.some((x) => {
|
let toLog = loggableKeywords.some((x) => {
|
||||||
return req.url.includes(x)
|
return req.url.includes(x)
|
||||||
})
|
})
|
||||||
|
const hostname = req.hostname.replace('www.', '').split('.')[0]
|
||||||
|
|
||||||
|
if (hostname.includes('dataeditor')) {
|
||||||
|
toLog = true
|
||||||
|
}
|
||||||
|
|
||||||
if (toLog) { logger.LogReq(req) }
|
if (toLog) { logger.LogReq(req) }
|
||||||
if (res.statusCode !== 404) { logger.LogStat(req.url, ip) }
|
if (res.statusCode !== 404) { logger.LogStat(req.url, ip) }
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user