supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Update Vercel redirect url documentation

Open ajayvignesh01 opened this issue 1 year ago • 4 comments

  • Uses Vercel system environment variables instead of having to add SITE_URL
  • Adds process.env.PORT to localhost to ensure correct url

Less steps overall and more flexibility

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

docs update

What is the current behavior?

  • User adds SITE_URL env variable to Vercel, then uses getURL()

What is the new behavior?

  • Use Vercel system environment variables - no need to add SITE_URL

Additional context

Can also use getURL in other places like revalidatePath(getURL('/blog/4'))

ajayvignesh01 avatar Oct 15 '24 17:10 ajayvignesh01

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2024 3:43pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
design-system ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2024 3:43pm
studio ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2024 3:43pm
studio-self-hosted ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2024 3:43pm
studio-staging ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2024 3:43pm
zone-www-dot-com ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2024 3:43pm

vercel[bot] avatar Oct 15 '24 17:10 vercel[bot]

@ajayvignesh01 is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Oct 15 '24 17:10 vercel[bot]

@charislam I'd like to change the note at the bottom indicating you can use it in other places as well. Think revalidatePath example is bad since you don't need to specify url for that.

Maybe a better example would be

console.log(getURL('/blog/4`))
// outputs https://supabase.com/blog/4

ajayvignesh01 avatar Oct 16 '24 15:10 ajayvignesh01

@ajayvignesh01, sure, that's a good point! I've disabled auto-merge, so feel free to push any updates you need. Afterwards, could you run npm run format as the PR seems to be failing Prettier check?

charislam avatar Oct 16 '24 16:10 charislam

Hi @ajayvignesh01 - We’re doing a bit of housekeeping and plan to close out PRs that have been inactive for more than 3 months. If you’re still interested in landing this, feel free to reopen it. Thanks!

Hallidayo avatar Nov 07 '25 15:11 Hallidayo