|
|
@ -6,9 +6,7 @@ var meta = require('../meta'),
|
|
|
|
auth = require('../routes/authentication'),
|
|
|
|
auth = require('../routes/authentication'),
|
|
|
|
|
|
|
|
|
|
|
|
path = require('path'),
|
|
|
|
path = require('path'),
|
|
|
|
fs = require('fs'),
|
|
|
|
|
|
|
|
nconf = require('nconf'),
|
|
|
|
nconf = require('nconf'),
|
|
|
|
winston = require('winston'),
|
|
|
|
|
|
|
|
flash = require('connect-flash'),
|
|
|
|
flash = require('connect-flash'),
|
|
|
|
templates = require('templates.js'),
|
|
|
|
templates = require('templates.js'),
|
|
|
|
bodyParser = require('body-parser'),
|
|
|
|
bodyParser = require('body-parser'),
|
|
|
@ -51,7 +49,7 @@ module.exports = function(app) {
|
|
|
|
app.use(cookieParser());
|
|
|
|
app.use(cookieParser());
|
|
|
|
|
|
|
|
|
|
|
|
var cookie = {
|
|
|
|
var cookie = {
|
|
|
|
maxAge: 1000 * 60 * 60 * 24 * parseInt(meta.config.loginDays || 14, 10)
|
|
|
|
maxAge: 1000 * 60 * 60 * 24 * (parseInt(meta.config.loginDays, 10) || 14)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (meta.config.cookieDomain) {
|
|
|
|
if (meta.config.cookieDomain) {
|
|
|
|