fix: use configured backend_url for API base instead of /api path
- Read HF_BACKEND_BASE_URL from localStorage in api client - Refresh baseURL on each request interceptor - Persist backend_url from wizard config during app bootstrap - Persist backend_base_url after setup save
This commit is contained in:
@@ -33,7 +33,11 @@ export default function App() {
|
||||
const res = await axios.get(`${WIZARD_BASE}/api/v1/config/harborforge.json`, {
|
||||
timeout: 5000,
|
||||
})
|
||||
if (res.data && res.data.initialized === true) {
|
||||
const cfg = res.data || {}
|
||||
if (cfg.backend_url) {
|
||||
localStorage.setItem('HF_BACKEND_BASE_URL', cfg.backend_url)
|
||||
}
|
||||
if (cfg.initialized === true) {
|
||||
setAppState('ready')
|
||||
} else {
|
||||
setAppState('setup')
|
||||
|
||||
Reference in New Issue
Block a user