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, }), }), });