Skip to content

Commit bf2a21d

Browse files
authored
Merge pull request #177 from sdktr/patch-2
Add SSLMODE to database connection settings
2 parents 6a07527 + 135199e commit bf2a21d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

configuration/configuration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def read_secret(secret_name):
3737
# PostgreSQL password
3838
'HOST': os.environ.get('DB_HOST', 'localhost'), # Database server
3939
'PORT': os.environ.get('DB_PORT', ''), # Database port (leave blank for default)
40+
'OPTIONS': {'sslmode': os.environ.get('DB_SSLMODE', 'prefer')},
41+
# Database connection SSLMODE
4042
'CONN_MAX_AGE': int(os.environ.get('DB_CONN_MAX_AGE', '300')),
4143
# Database connection persistence
4244
}

0 commit comments

Comments
 (0)