Update Vercel redirect url documentation
- 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'))
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 |
@ajayvignesh01 is attempting to deploy a commit to the Supabase Team on Vercel.
A member of the Team first needs to authorize it.
@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, 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?
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!