From 0497b61b1a7719b78c2d6557aab7207107ac8e17 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Sat, 25 Aug 2018 14:09:32 -0400 Subject: [PATCH] feat(controller): set CONN_MAX_AGE from env var --- rootfs/api/settings/production.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rootfs/api/settings/production.py b/rootfs/api/settings/production.py index fd745752e..00a62e45b 100644 --- a/rootfs/api/settings/production.py +++ b/rootfs/api/settings/production.py @@ -27,8 +27,6 @@ 'security.W008' ] -CONN_MAX_AGE = 60 * 3 - # SECURITY: change this to allowed fqdn's to prevent host poisioning attacks # https://docs.djangoproject.com/en/1.11/ref/settings/#allowed-hosts ALLOWED_HOSTS = ['*'] @@ -368,7 +366,7 @@ 'HOST': os.environ.get('DEIS_DATABASE_SERVICE_HOST', ''), 'PORT': os.environ.get('DEIS_DATABASE_SERVICE_PORT', 5432), # https://docs.djangoproject.com/en/1.11/ref/databases/#persistent-connections - 'CONN_MAX_AGE': 600, + 'CONN_MAX_AGE': os.environ.get('CONN_MAX_AGE', 600), } }