Skip to content

Commit 11c9e66

Browse files
author
Kingdon Barrett
committed
feat(controller): set CONN_MAX_AGE from env var
1 parent 8344d5e commit 11c9e66

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

rootfs/api/settings/production.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
'security.W008'
2828
]
2929

30-
CONN_MAX_AGE = 60 * 3
31-
3230
# SECURITY: change this to allowed fqdn's to prevent host poisioning attacks
3331
# https://docs.djangoproject.com/en/1.11/ref/settings/#allowed-hosts
3432
ALLOWED_HOSTS = ['*']
@@ -368,7 +366,7 @@
368366
'HOST': os.environ.get('DEIS_DATABASE_SERVICE_HOST', ''),
369367
'PORT': os.environ.get('DEIS_DATABASE_SERVICE_PORT', 5432),
370368
# https://docs.djangoproject.com/en/1.11/ref/databases/#persistent-connections
371-
'CONN_MAX_AGE': 600,
369+
'CONN_MAX_AGE': os.environ.get('CONN_MAX_AGE', 600),
372370
}
373371
}
374372

0 commit comments

Comments
 (0)