Allow cookie domain customization from meta config

v1.18.x
Aure77 11 years ago
parent 7b27c349ae
commit 965d6a0d66

@ -170,9 +170,8 @@ module.exports = function(app, data) {
var cookie = {
maxAge: 1000 * 60 * 60 * 24 * parseInt(meta.configs.loginDays || 14, 10)
};
var cookieDomain = nconf.get('cookie-domain');
if(cookieDomain) {
cookie.domain = cookieDomain;
if(meta.config.cookieDomain) {
cookie.domain = meta.config.cookieDomain;
}
app.use(session({

Loading…
Cancel
Save