Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Management Services
Seismic
Seismic DMS Suite
seismic-dms-service
Commits
181b51ce
Commit
181b51ce
authored
Feb 06, 2021
by
Anuj Gupta
Browse files
Added config for REDIS TLS
parent
874b57ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cloud/config.ts
View file @
181b51ce
...
...
@@ -57,6 +57,9 @@ export abstract class Config implements IConfig {
// Unit Test activation flag
public
static
UTEST
:
string
;
// Cache TLS DISABLE flag
public
static
CACHE_TLS_DISABLE
:
string
;
// Service base configurations
public
static
SERVICE_ENV
:
string
;
public
static
SERVICE_PORT
:
number
;
...
...
@@ -216,3 +219,6 @@ export class ConfigFactory extends CloudFactory {
// Set the Utest flag correctly as sooon as the config class get loaded
Config
.
UTEST
=
process
.
env
.
UTEST
;
// Set the CACHE(REDIS) TLS DISABLE flag correctly. If not SET TLS is assume enabled so that change is non breaking
Config
.
CACHE_TLS_DISABLE
=
process
.
env
.
CACHE_TLS_DISABLE
;
src/shared/cache.ts
View file @
181b51ce
...
...
@@ -37,12 +37,18 @@ export class Cache<T=string> {
this
.
_redisClient
=
Config
.
UTEST
?
require
(
'
redis-mock
'
).
createClient
()
:
connection
.
KEY
?
connection
.
KEY
?
Config
.
CACHE_TLS_DISABLE
?
redis
.
createClient
({
host
:
connection
.
ADDRESS
,
port
:
connection
.
PORT
,
auth_pass
:
connection
.
KEY
,
tls
:
{
servername
:
connection
.
ADDRESS
}})
:
})
:
redis
.
createClient
({
host
:
connection
.
ADDRESS
,
port
:
connection
.
PORT
,
auth_pass
:
connection
.
KEY
,
tls
:
{
servername
:
connection
.
ADDRESS
}
})
:
redis
.
createClient
({
host
:
connection
.
ADDRESS
,
port
:
connection
.
PORT
,
...
...
Anuj Gupta
@anujgupta
mentioned in commit
32267b96
·
Feb 06, 2021
mentioned in commit
32267b96
mentioned in commit 32267b969ef1d4de36cc1df1c194960b9b6a0efa
Toggle commit list
Anuj Gupta
@anujgupta
mentioned in merge request
!12 (merged)
·
Feb 06, 2021
mentioned in merge request
!12 (merged)
mentioned in merge request !12
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment