mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-24 15:13:09 +00:00
added logging in
This commit is contained in:
parent
3d36dc7d6c
commit
d8e7bacec4
1 changed files with 3 additions and 1 deletions
|
@ -64,12 +64,14 @@ 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"
|
||||
req.session.cdnBlocked = true
|
||||
|
||||
isDark = req.headers?.host?.slice(0,4)?.toLowerCase() == "dark"
|
||||
isSmoke = req.headers?.host?.slice(0,5)?.toLowerCase() == "smoke"
|
||||
isLive = !isDark and !isSmoke
|
||||
|
||||
|
||||
if cdnAvailable and isLive and !cdnBlocked
|
||||
staticFilesBase = Settings.cdn?.web?.host
|
||||
else if darkCdnAvailable and isDark
|
||||
|
|
Loading…
Reference in a new issue