From ce3e0f6d531404ab14568ab3faac584cf7628c02 Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Fri, 2 Feb 2018 01:08:41 +0000 Subject: [PATCH] require SSL on postgres --- settings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/settings.py b/settings.py index 9a580de..b01eb01 100644 --- a/settings.py +++ b/settings.py @@ -50,6 +50,9 @@ if get_from_env('DATABASE_URL', None): DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2' DATABASES['default']['CONN_MAX_AGE'] = 600 + # require SSL + DATABASES['default']['OPTIONS'] = {'sslmode': 'require'} + # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. -- GitLab