From ad476cb2a319cd16c6b1de891630509612d0c067 Mon Sep 17 00:00:00 2001 From: Severin Ibarluzea Date: Mon, 11 Jan 2021 09:24:37 -0500 Subject: [PATCH] fix: reject unauthorized --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index d413dab..b487838 100644 --- a/index.js +++ b/index.js @@ -39,8 +39,11 @@ module.exports = ({ defaults.password || "", database, - ssl: Boolean(process.env.POSTGRES_SSL), - rejectUnauthorized: false, + ssl: process.env.POSTGRES_SSL + ? Boolean(process.env.POSTGRES_SSL) + : { + rejectUnauthorized: false, + }, } const createDatabase = async (dbName) => {