Vercel integration using pooler and secure connection?

Dear Team, I am following this tutorial guide Connect with the Neon Vercel Integration — Neon Docs to connect neon to vercel.

It all works like magic, thank you!

Now however, the default injected secrets are direct connection URIs.
I see in the docs Connection pooling — Neon Docs that it requires changing the URI to add -pooler.

Same for the ?sslmode=require

Is there any possible way to use connection pooling with the Vercel integration without manually manipulating the env variable?

Thank you!

Hi @ThibaultJanBeyer ,

The current version of the integration only adds direct connections to Vercel projects. Pooled connections have to be added manually. It is something we plan to add in future iterations of the integration.

Regarding ?sslmode=require, what driver are you using?

Hi Raouf thanks for coming back to me, I use:

import { drizzle } from “drizzle-orm/postgres-js”;
import postgres from “postgres”;

Which would complain on connection is not set to require

Thanks @ThibaultJanBeyer ,

You can also add Postgres options with postgres.js driver in your code .

Can you try the below code?

const sql = postgres(connectionString, { ssl: { rejectUnauthorized: false } })

Let me know if this helps.