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);