From 30b5ff0d96a25ef21cccaebd242ef69b7c4a84d1 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Wed, 28 Mar 2018 12:49:03 +0200 Subject: Add session data to env vars Currently the session secret can only be set by config.json or docker secrets. This creates a problem on Heroku hosted instances that can not set a session secret. Since we automatically generate them on startup this results in an logout of all users on every config change in Heroku. Signed-off-by: Sheogorath --- lib/config/environment.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/config') diff --git a/lib/config/environment.js b/lib/config/environment.js index cab3bc3e..3dde4786 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -26,6 +26,8 @@ module.exports = { allowFreeURL: toBooleanConfig(process.env.HMD_ALLOW_FREEURL), defaultPermission: process.env.HMD_DEFAULT_PERMISSION, dbURL: process.env.HMD_DB_URL, + sessionSecret: process.env.HMD_SESSION_SECRET, + sessionLife: toIntegerConfig(process.env.HMD_SESSION_LIFE), imageUploadType: process.env.HMD_IMAGE_UPLOAD_TYPE, imgur: { clientID: process.env.HMD_IMGUR_CLIENTID -- cgit v1.2.3