'use strict';

const cookieSession = require('cookie-session');

module.exports = function(config) {
    return cookieSession({
        name: 'unleash-session',
        keys: [config.secret],
        maxAge: config.sessionAge,
        secure: !!config.secureHeaders,
        path: config.baseUriPath === '' ? '/' : config.baseUriPath,
    });
};

@@ -234,16 +234,21 @@
   secure
+Proxy
 : !!conf

use secure proxy to session cookie