Code review change

This commit is contained in:
Dominic Lennon
2017-01-16 08:48:53 +00:00
parent 04e5707143
commit a06e39528f
4 changed files with 10 additions and 18 deletions

View File

@@ -171,13 +171,11 @@ function setupFavicon(app) {
function setupCookie() {
var ttlDays = 1000 * 60 * 60 * 24 * (parseInt(meta.config.loginDays, 10) || 0);
var ttlHours = 1000 * 60 * 60 * (parseInt(meta.config.loginHours, 10) || 0);
var ttlMinutes = 1000 * 60 * (parseInt(meta.config.loginMinutes, 10) || 0);
var ttlSeconds = 1000 * (parseInt(meta.config.loginSeconds, 10) || 0);
var ttlTotal = (ttlDays + ttlHours + ttlMinutes + ttlSeconds) || 1209600000; // Default to 14 days
var ttl = ttlSeconds || ttlDays || 1209600000; // Default to 14 days
var cookie = {
maxAge: ttlTotal
maxAge: ttl
};
if (nconf.get('cookieDomain') || meta.config.cookieDomain) {