Skip to content

Commit d584f52

Browse files
author
Kingdon Barrett
committed
feat(controller): set CONN_MAX_AGE from env var
1 parent 732da5f commit d584f52

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
@@ -24,8 +24,6 @@
2424
'security.W008'
2525
]
2626

27-
CONN_MAX_AGE = 60 * 3
28-
2927
# SECURITY: change this to allowed fqdn's to prevent host poisioning attacks
3028
# https://docs.djangoproject.com/en/1.11/ref/settings/#allowed-hosts
3129
ALLOWED_HOSTS = ['*']
@@ -354,7 +352,7 @@
354352
'HOST': os.environ.get('DEIS_DATABASE_SERVICE_HOST', ''),
355353
'PORT': os.environ.get('DEIS_DATABASE_SERVICE_PORT', 5432),
356354
# https://docs.djangoproject.com/en/1.11/ref/databases/#persistent-connections
357-
'CONN_MAX_AGE': 600,
355+
'CONN_MAX_AGE': os.environ.get('CONN_MAX_AGE', 600),
358356
}
359357
}
360358

0 commit comments

Comments
 (0)