Skip to content

Commit

Permalink
fix: Partial revert #853
Browse files Browse the repository at this point in the history
Only set ADMIN_API_URL to localhost:30080 when NODE_ENV is development

Signed-off-by: Chi-Sheng Liu <[email protected]>
  • Loading branch information
MortalHappiness committed Apr 19, 2024
1 parent 7e0f2bd commit d3f9bb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion website/console/env/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ 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.NODE_ENV === 'development'
? 'localhost:30080'
: 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}` : '';
Expand Down

0 comments on commit d3f9bb2

Please sign in to comment.