From 1d7f227a1c45278bc2525df490d0eced26c8295a Mon Sep 17 00:00:00 2001 From: Chi-Sheng Liu Date: Sat, 20 Apr 2024 00:23:15 +0800 Subject: [PATCH] fix: Partial revert PR #853 Signed-off-by: Chi-Sheng Liu --- website/console/env/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/console/env/index.ts b/website/console/env/index.ts index d18276e09..d9a9cd176 100644 --- a/website/console/env/index.ts +++ b/website/console/env/index.ts @@ -31,13 +31,13 @@ const CERTIFICATE_PATH = '../../scripts/certificate'; const ADMIN_API_USE_SSL = process.env.ADMIN_API_USE_SSL || 'http'; // Admin domain used as base for window URL and API urls -const ADMIN_API_URL = process.env.ADMIN_API_URL?.replace(/https?:\/\//, '') || 'localhost:30080'; +const ADMIN_API_URL = process.env.ADMIN_API_URL?.replace(/https?:\/\//, '') || ''; // If this is unset, API calls will default to the same host used to serve this app const ADMIN_API = ADMIN_API_URL ? `//${ADMIN_API_URL}` : ''; // Webpage for local development -const LOCAL_DEV_HOST = process.env.LOCAL_DEV_HOST || 'localhost'; +const LOCAL_DEV_HOST = process.env.LOCAL_DEV_HOST || `localhost.${ADMIN_API_URL}`; /** * @depricated use BASE_HREF