Skip to content

Commit

Permalink
feat(controller): set CONN_MAX_AGE from env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingdon Barrett committed Nov 27, 2020
1 parent 5bdad97 commit 0497b61
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rootfs/api/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ['*']
Expand Down Expand Up @@ -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),
}
}

Expand Down

0 comments on commit 0497b61

Please sign in to comment.