Skip to content

Commit

Permalink
feat: use vercel url by default for public base url
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannfleurydev committed Oct 4, 2023
1 parent 80ce9d1 commit 6402dcd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export const env = createEnv({
LOGGER_LEVEL: process.env.LOGGER_LEVEL,
LOGGER_PRETTY: process.env.LOGGER_PRETTY,

NEXT_PUBLIC_BASE_URL: process.env.NEXT_PUBLIC_BASE_URL,
NEXT_PUBLIC_BASE_URL: process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: process.env.NEXT_PUBLIC_BASE_URL,
NEXT_PUBLIC_DEV_ENV_COLOR_SCHEME:
process.env.NEXT_PUBLIC_DEV_ENV_COLOR_SCHEME,
NEXT_PUBLIC_DEV_ENV_NAME: process.env.NEXT_PUBLIC_DEV_ENV_NAME,
Expand Down

1 comment on commit 6402dcd

@vercel
Copy link

@vercel vercel bot commented on 6402dcd Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.