From 87c944c3675c55701e7dc6d4dc2aa1bdd8f30af9 Mon Sep 17 00:00:00 2001
From: Rosanny <rosanny.sihombing@hft-stuttgart.de>
Date: Fri, 4 Jun 2021 16:20:00 +0200
Subject: [PATCH] update configuration

---
 app.js           | 2 +-
 config/config.js | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/app.js b/app.js
index 26133481..b5aac0bc 100644
--- a/app.js
+++ b/app.js
@@ -47,7 +47,7 @@ app.use(session(
   {
     resave: true,
     saveUninitialized: true,
-    secret: 'thisisasecret'
+    secret: config.app.sessionSecret
   }
 ));
 app.use(flash());
diff --git a/config/config.js b/config/config.js
index c99b06fa..3da503db 100644
--- a/config/config.js
+++ b/config/config.js
@@ -3,7 +3,8 @@ module.exports = {
     app: {
       name: 'User Account Management',
       port: process.env.PORT || 9989,
-      host: 'http://localhost:9989'
+      host: 'http://localhost:9989',
+      sessionSecret: 'thisisasecret'
     },
     passport: {
       strategy: 'saml',
@@ -40,7 +41,8 @@ module.exports = {
     app: {
       name: 'User Account Management',
       port: process.env.PORT || 9989,
-      host: 'https://m4lab.hft-stuttgart.de/account'
+      host: 'https://m4lab.hft-stuttgart.de/account',
+      sessionSecret: 'thisisasecret'
     },
     passport: {
       strategy: 'saml',
-- 
GitLab