From 04336c9712a4d863e8d0eeff8d165b48074eaab0 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Mon, 2 Nov 2015 21:13:02 -0800 Subject: [PATCH] Fix merge error --- src/web/jade.js | 2 +- src/web/webserver.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/web/jade.js b/src/web/jade.js index 02c5d94a..fed5acd7 100644 --- a/src/web/jade.js +++ b/src/web/jade.js @@ -15,7 +15,7 @@ function merge(locals, res) { siteAuthor: "Calvin 'calzoneman' 'cyzon' Montgomery", loginDomain: Config.get("https.enabled") ? Config.get("https.full-address") : Config.get("http.full-address"), - csrfToken: res.req.csrfToken(), + csrfToken: typeof res.req.csrfToken === 'function' ? res.req.csrfToken() : '', baseUrl: getBaseUrl(res) }; if (typeof locals !== "object") { diff --git a/src/web/webserver.js b/src/web/webserver.js index 5416feaa..d877cf96 100644 --- a/src/web/webserver.js +++ b/src/web/webserver.js @@ -144,7 +144,6 @@ module.exports = { init: function (app, webConfig, ioConfig, clusterClient, channelIndex, session) { app.use((req, res, next) => { counters.add("http:request", 1); - req._ip = ipForRequest(req); next(); }); require('./middleware/x-forwarded-for')(app, webConfig);