Browse Source

set ssl to require on db connection

kc-covid19-zipcode
prasket 2 months ago
parent
commit
e7addb2e6c
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      database/create_covid-19_zip.py
  2. +1
    -1
      database/load_db.py

+ 1
- 1
database/create_covid-19_zip.py View File

@@ -8,7 +8,7 @@ username = creds.dblogin['username']
password = creds.dblogin['password']
port = creds.dblogin['port']

conn = psycopg2.connect(f"host={dbhost} dbname={database} user={username} password={password} port={port}")
conn = psycopg2.connect(f"host={dbhost} dbname={database} user={username} password={password} port={port} sslmode='require'")

cur = conn.cursor()
cur.execute("""


+ 1
- 1
database/load_db.py View File

@@ -10,7 +10,7 @@ username = creds.dblogin['username']
password = creds.dblogin['password']
port = creds.dblogin['port']

conn = psycopg2.connect(f"host={dbhost} dbname={database} user={username} password={password} port={port}")
conn = psycopg2.connect(f"host={dbhost} dbname={database} user={username} password={password} port={port} sslmode='require'")

cur = conn.cursor()



Loading…
Cancel
Save