mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
just use plain req.ip for logging
This commit is contained in:
parent
fcc7585444
commit
934e908697
1 changed files with 1 additions and 2 deletions
|
@ -64,8 +64,7 @@ module.exports = (app, webRouter, apiRouter)->
|
|||
cdnBlocked = req.query.nocdn == 'true' or req.session.cdnBlocked
|
||||
|
||||
if cdnBlocked and !req.session.cdnBlocked?
|
||||
ip = req.ip || req.socket?.socket?.remoteAddress || req.socket?.remoteAddress
|
||||
logger.log user_id:req?.session?.user?._id, ip:ip, "cdnBlocked for user, not using it"
|
||||
logger.log user_id:req?.session?.user?._id, ip:req?.ip, "cdnBlocked for user, not using it and turning it off for future requets"
|
||||
req.session.cdnBlocked = true
|
||||
|
||||
isDark = req.headers?.host?.slice(0,4)?.toLowerCase() == "dark"
|
||||
|
|
Loading…
Reference in a new issue