From de777bc844238aa40b3c007e4fa65abed1d9b08e Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Sat, 25 Apr 2020 09:32:59 +0200 Subject: [PATCH] Make redis prefix configurable --- config/default.ts | 3 ++- src/components/RedisComponent.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/default.ts b/config/default.ts index d9172d6..3bf3500 100644 --- a/config/default.ts +++ b/config/default.ts @@ -14,7 +14,8 @@ export default { }, redis: { host: "127.0.0.1", - port: 6379 + port: 6379, + prefix: 'wms' }, session: { secret: "very_secret_not_known", diff --git a/src/components/RedisComponent.ts b/src/components/RedisComponent.ts index f0efd3c..ca2b698 100644 --- a/src/components/RedisComponent.ts +++ b/src/components/RedisComponent.ts @@ -19,7 +19,7 @@ export default class RedisComponent extends ApplicationComponent { }); this.store = new RedisStore({ client: this.redisClient, - prefix: 'wms-sess:', + prefix: config.get('redis.prefix') + '-session:', }); }