Skip to content

Commit 79eeb54

Browse files
feat: revert change to db ssl
1 parent dc671bf commit 79eeb54

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/db/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function getPool(databaseUrl: string, nodeEnv?: string): Pool {
77
const isProduction = nodeEnv === "production";
88
pool = new Pool({
99
connectionString: databaseUrl,
10-
...(isProduction ? { ssl: { rejectUnauthorized: true } } : {}),
10+
...(isProduction ? { ssl: { rejectUnauthorized: false } } : {}),
1111
});
1212
}
1313
return pool;
@@ -21,7 +21,7 @@ export function getReadOnlyPool(databaseUrl: string, nodeEnv?: string): Pool {
2121
readOnlyPool = new Pool({
2222
connectionString: databaseUrl,
2323
max: 3,
24-
...(isProduction ? { ssl: { rejectUnauthorized: true } } : {}),
24+
...(isProduction ? { ssl: { rejectUnauthorized: false } } : {}),
2525
});
2626
readOnlyPool.on("connect", (client) => {
2727
client.query(

src/worker/pgBossClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function createBoss(config: Config): PgBoss {
88
archiveCompletedAfterSeconds: 86400,
99
monitorStateIntervalSeconds: 30,
1010
...(config.nodeEnv === "production"
11-
? { ssl: { rejectUnauthorized: true } }
11+
? { ssl: { rejectUnauthorized: false } }
1212
: {}),
1313
});
1414
}

0 commit comments

Comments
 (0)