From 6402dcd967af41b557afaba11ba3e6735b4970fb Mon Sep 17 00:00:00 2001 From: Yoann Fleury Date: Wed, 4 Oct 2023 17:57:43 +0200 Subject: [PATCH] feat: use vercel url by default for public base url --- src/env.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/env.mjs b/src/env.mjs index a80128992..e1dfaeb92 100644 --- a/src/env.mjs +++ b/src/env.mjs @@ -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,