From 83bd0275a9032a945db32459b321eab21d258c5b Mon Sep 17 00:00:00 2001 From: Daniel Naab Date: Mon, 19 Aug 2024 10:20:20 -0500 Subject: [PATCH] Ignore self-signed cert errors with rejectUnauthorized. Revisit by seeing if we can install the RDS certs on the container --- packages/database/src/clients/knex.ts | 2 +- packages/database/src/clients/kysely/postgres.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/database/src/clients/knex.ts b/packages/database/src/clients/knex.ts index 56053b93..8423ead0 100644 --- a/packages/database/src/clients/knex.ts +++ b/packages/database/src/clients/knex.ts @@ -18,7 +18,7 @@ export const getPostgresKnex = ( client: 'pg', connection: { connectionString, - ssl, + ssl: ssl ? { rejectUnauthorized: false } : false, }, useNullAsDefault: true, migrations: { diff --git a/packages/database/src/clients/kysely/postgres.ts b/packages/database/src/clients/kysely/postgres.ts index e76b30f2..c6bcc597 100644 --- a/packages/database/src/clients/kysely/postgres.ts +++ b/packages/database/src/clients/kysely/postgres.ts @@ -11,7 +11,7 @@ export const createPostgresDatabase = ( dialect: new PostgresDialect({ pool: new pg.Pool({ connectionString, - ssl, + ssl: ssl ? { rejectUnauthorized: false } : false, }), }), });