Skip to content

Commit 9786498

Browse files
committed
default to enforcing TLS and verifying CA and server cert hostname
1 parent 69636b2 commit 9786498

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bornhack/environment_settings.py.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ SECRET_KEY = '{{ django_secret_key }}'
44
ALLOWED_HOSTS = {{ django_allowed_hostnames }}
55

66
# Database settings
7-
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
87
DATABASES = {
98
'default': {
109
'ENGINE': 'django_prometheus.db.backends.postgis',
1110
'NAME': '{{ django_postgres_dbname }}',
1211
'USER': '{{ django_postgres_user }}',
1312
'PASSWORD': '{{ django_postgres_password }}',
1413
'HOST': '{{ django_postgres_host }}',
14+
# comment this out for non-tls connection to postgres
15+
'OPTIONS': {'sslmode': 'verify-full', 'sslrootcert': 'system'},
1516
},
1617
}
1718

0 commit comments

Comments
 (0)