From 73d9d9ad03576684eb8cb6a00a64c7fdf2c85929 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 8 Apr 2022 10:21:05 -0400 Subject: [PATCH] fix: move handler for nconf sessionKey into defaults() --- src/prestart.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/prestart.js b/src/prestart.js index 59c909a83d..a69f570f1e 100644 --- a/src/prestart.js +++ b/src/prestart.js @@ -55,6 +55,7 @@ function loadConfig(configFile) { upload_path: 'public/uploads', views_dir: path.join(paths.baseDir, 'build/public/templates'), version: pkg.version, + sessionKey: 'express.sid', isCluster: false, isPrimary: true, jobsDisabled: false, @@ -80,12 +81,6 @@ function loadConfig(configFile) { nconf.set('upload_path', path.resolve(nconf.get('base_dir'), nconf.get('upload_path'))); nconf.set('upload_url', '/assets/uploads'); - - // nconf defaults, if not set in config - if (!nconf.get('sessionKey')) { - nconf.set('sessionKey', 'express.sid'); - } - if (nconf.get('url')) { nconf.set('url_parsed', url.parse(nconf.get('url'))); // Parse out the relative_url and other goodies from the configured URL