diff --git a/src/app/components/ClientConfigLoader.tsx b/src/app/components/ClientConfigLoader.tsx index 72d367c0..7281cf2e 100644 --- a/src/app/components/ClientConfigLoader.tsx +++ b/src/app/components/ClientConfigLoader.tsx @@ -4,8 +4,12 @@ import { ClientConfig } from '../hooks/useClientConfig'; import { trimTrailingSlash } from '../utils/common'; const getClientConfig = async (): Promise => { - const url = `${trimTrailingSlash(import.meta.env.BASE_URL)}/config.json`; - const config = await fetch(url, { method: 'GET' }); + let url = `${trimTrailingSlash(import.meta.env.BASE_URL)}/config.${window.location.hostname}.json`; + let config = await fetch(url, { method: 'GET' }); + if(config.status===404) { + url = `${trimTrailingSlash(import.meta.env.BASE_URL)}/config.json`; + config = await fetch(url, { method: 'GET' }); + } return config.json(); };