Fix TLS certificate error for Supabase pooler connection
Supabase's PgBouncer pooler uses a certificate not in Node's default CA store, causing "self-signed certificate in certificate chain" errors on Vercel. Configure pg.Pool with ssl.rejectUnauthorized: false. Made-with: Cursor
This commit is contained in:
parent
21c863da01
commit
fd3e1ba150
1 changed files with 1 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ function createPrismaClient() {
|
||||||
const pool = new pg.Pool({
|
const pool = new pg.Pool({
|
||||||
connectionString: process.env.DATABASE_URL,
|
connectionString: process.env.DATABASE_URL,
|
||||||
max: 5,
|
max: 5,
|
||||||
|
ssl: { rejectUnauthorized: false },
|
||||||
});
|
});
|
||||||
const adapter = new PrismaPg(pool);
|
const adapter = new PrismaPg(pool);
|
||||||
return new PrismaClient({ adapter });
|
return new PrismaClient({ adapter });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue