Skip to content

Commit

Permalink
refactor: parse PUBLIC_PATH for CDN support
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoa committed Aug 20, 2024
1 parent bd1561e commit 8dc541a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
import { APP_CONFIG_INITIALIZED, CONFIG_CHANGED } from './constants';

import { publish, subscribe } from './pubSub';
import { ensureDefinedConfig } from './utils';
import { ensureDefinedConfig, getPath } from './utils';

function extractRegex(envVar) {
// Convert the environment variable string to a regex, while guarding
Expand All @@ -143,7 +143,7 @@ let config = {
ACCOUNT_PROFILE_URL: process.env.ACCOUNT_PROFILE_URL,
ACCOUNT_SETTINGS_URL: process.env.ACCOUNT_SETTINGS_URL,
BASE_URL: process.env.BASE_URL,
PUBLIC_PATH: process.env.PUBLIC_PATH || '/',
PUBLIC_PATH: getPath(process.env.PUBLIC_PATH) || '/',
CREDENTIALS_BASE_URL: process.env.CREDENTIALS_BASE_URL,
CSRF_TOKEN_API_PATH: process.env.CSRF_TOKEN_API_PATH,
DISCOVERY_API_BASE_URL: process.env.DISCOVERY_API_BASE_URL,
Expand Down

0 comments on commit 8dc541a

Please sign in to comment.