From 03e7e593ca83108b90f7badcdcb88443fedf64ac Mon Sep 17 00:00:00 2001 From: Alban Mouton Date: Fri, 14 Dec 2018 21:03:47 +0100 Subject: [PATCH] feat: passing domain to session middleware --- config/custom-environment-variables.js | 1 + config/default.js | 1 + package.json | 2 +- server/app.js | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config/custom-environment-variables.js b/config/custom-environment-variables.js index 82ab422c03..e86e4542fc 100644 --- a/config/custom-environment-variables.js +++ b/config/custom-environment-variables.js @@ -2,6 +2,7 @@ module.exports = { mode: 'MODE', publicUrl: 'PUBLIC_URL', wsPublicUrl: 'WS_PUBLIC_URL', + sessionDomain: 'SESSION_DOMAIN', directoryUrl: 'DIRECTORY_URL', privateDirectoryUrl: 'PRIVATE_DIRECTORY_URL', openapiViewerUrl: 'OPENAPI_VIEWER_URL', diff --git a/config/default.js b/config/default.js index 928a54067d..496eb504ab 100644 --- a/config/default.js +++ b/config/default.js @@ -5,6 +5,7 @@ module.exports = { publicUrl: 'http://localhost:8080', wsPublicUrl: 'ws://localhost:8080', dataDir: '/data', + sessionDomain: null, directoryUrl: 'http://localhost:8080', privateDirectoryUrl: '', openapiViewerUrl: 'https://koumoul.com/openapi-viewer/', diff --git a/package.json b/package.json index 84cda093d3..8afd169fdd 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "@digibytes/markdownit": "^1.2.1", - "@koumoul/sd-express": "^0.12.0", + "@koumoul/sd-express": "^0.13.0", "@koumoul/sd-vue": "^0.11.0", "@koumoul/vue-multianalytics": "^1.10.1", "@koumoul/vuetify-jsonschema-form": "^0.16.0", diff --git a/server/app.js b/server/app.js index b66240b4f1..9ebc041e58 100644 --- a/server/app.js +++ b/server/app.js @@ -22,7 +22,8 @@ const nuxt = require('./nuxt') const session = require('@koumoul/sd-express')({ directoryUrl: config.directoryUrl, privateDirectoryUrl: config.privateDirectoryUrl || config.directoryUrl, - publicUrl: config.publicUrl + publicUrl: config.publicUrl, + cookieDomain: config.sessionDomain }) const app = express()