From db4194eec0af8737af827c0a31de3ed994202e4d Mon Sep 17 00:00:00 2001 From: lizzie cullen davison Date: Thu, 16 Dec 2021 13:55:27 +0000 Subject: [PATCH] Fix self-signed certificate error when connecting to PG As per https://github.com/brianc/node-postgres/issues/2009 --- lib/PostgresDb.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/PostgresDb.js b/lib/PostgresDb.js index 1f5b772..8e23eaf 100644 --- a/lib/PostgresDb.js +++ b/lib/PostgresDb.js @@ -9,7 +9,9 @@ const pgp = require('pg-promise')({ const PostgresDb = pgp({ connectionString: process.env.DATABASE_URL, - ssl: true + ssl: { + rejectUnauthorized: false + } }); module.exports = PostgresDb;