Fix merge error

This commit is contained in:
calzoneman 2015-11-02 21:13:02 -08:00
parent 47ef670f34
commit 04336c9712
2 changed files with 1 additions and 2 deletions

View File

@ -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") {

View File

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