Added option to enable/disable redis session store; fixed the checks for username, password, and database number when setting up the Redis connection
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@ -4,11 +4,11 @@ exports.default = function() {
|
||||
let redisUrl = 'redis://';
|
||||
|
||||
// add the redis username if defined
|
||||
if (typeof redisConfig.get('username') !== 'undefined') {
|
||||
if (redisConfig.has('username')) {
|
||||
redisUrl += redisConfig.get('username');
|
||||
}
|
||||
// add the user password if defined
|
||||
if (typeof redisConfig.get('password') !== 'undefined') {
|
||||
if (redisConfig.has('password')) {
|
||||
redisUrl += ':' + redisConfig.get('password') + '@';
|
||||
}
|
||||
// add redis host URL
|
||||
@ -16,7 +16,7 @@ exports.default = function() {
|
||||
// add redis host port
|
||||
redisUrl += ':' + redisConfig.get('port');
|
||||
// add redis database number if defined
|
||||
if (typeof redisConfig.get('number') !== 'undefined') {
|
||||
if (redisConfig.has('number')) {
|
||||
redisUrl += redisConfig.get('number');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user