I want to force Django to use SSL to connect to my postgres database.
This question indicates that I need to pass sslmode=\'require\' to the psycopg2 connec
sslmode=\'require\'
If you're using dj_database_url you can pass ssl_require=True which sets the option for you.
ssl_require=True
import dj_database_url DATABASES['default'] = dj_database_url.config(ssl_require=True)