SSL, Self-Signed Certificates
Error P1011: self-signed certificate in certificate chain
What was happening?
Vercel (Linux-based) is extremely strict about SSL.
Supabase’s connection pooler uses a certificate that Vercel doesn’t automatically trust.
So Vercel did the safest thing possible:
I don’t recognize this issuer. Connection denied.
The fix
I had to explicitly tell the PostgreSQL driver to trust the connection:
Set
rejectUnauthorized: falsein thepgpool configUpdated the connection string to use
sslmode=no-verify