From 934e908697b95969f3c4581992604144429e9f9e Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 23 Aug 2016 17:00:13 +0100 Subject: [PATCH] just use plain req.ip for logging --- services/web/app/coffee/infrastructure/ExpressLocals.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/web/app/coffee/infrastructure/ExpressLocals.coffee b/services/web/app/coffee/infrastructure/ExpressLocals.coffee index 60f1b682e5..d3b9d9a24b 100644 --- a/services/web/app/coffee/infrastructure/ExpressLocals.coffee +++ b/services/web/app/coffee/infrastructure/ExpressLocals.coffee @@ -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"