how to set the dynamic preview host url in environment variable in vercel?
Unanswered
American Crocodile posted this in #help-forum
American CrocodileOP
I want to set an environment variable NEXT_PUBLIC_API_URL that points to a preview deployment when I push an update to github. As the preview host url is dynamic, how do I set this in Vercel's Environment Variables setting?
1 Reply
@American Crocodile I want to set an environment variable NEXT_PUBLIC_API_URL that points to a preview deployment when I push an update to github. As the preview host url is dynamic, how do I set this in Vercel's Environment Variables setting?
You dont need to do that, you already have
NEXT_PUBLIC_VERCEL_URL https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables#framework-environment-variables