Skip to content

Commit ac6d667

Browse files
committed
[frontend] configurable session signing
1 parent 4447279 commit ac6d667

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

frontend/express/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ app.get(countlyConfig.path + '/appimages/*', function(req, res) {
391391
var oneYear = 31557600000;
392392
app.use(countlyConfig.path, express.static(__dirname + '/public', { maxAge: oneYear }));
393393
app.use(session({
394-
secret: 'countlyss',
394+
secret: countlyConfig.web.session_secret || 'countlyss',
395395
cookie: { httpOnly: true, maxAge: 1000 * 60 * 60 * 24 * 365, secure: countlyConfig.web.secure_cookies || false },
396396
store: new SkinStore(countlyDb),
397397
saveUninitialized: false,

frontend/express/config.sample.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ var countlyConfig = {
7070
* @property {boolean} use_intercom - true, to use intercom in dashboard for communication with Countly
7171
* @property {boolean} secure_cookies - true, to use secure cookies, enable only if you have https enabled
7272
* @property {string} track - allow Countly to collect stats about amount of apps and datapoints as well as feature usage.
73+
* @property {string} session_secret - secret used to sign the session ID cookie.
7374
* Possible values are:
7475
* "all" - track all,
7576
* "GA" - track only Global admins,
@@ -81,7 +82,8 @@ var countlyConfig = {
8182
host: "localhost",
8283
use_intercom: true,
8384
secure_cookies: false,
84-
track: "all"
85+
track: "all",
86+
session_secret: "countlyss"
8587
},
8688
/**
8789
* Legacy value, not supported

0 commit comments

Comments
 (0)