feat: allow backend URL override via env var
This commit is contained in:
parent
502cf5b61b
commit
56a7251b47
1 changed files with 10 additions and 0 deletions
|
|
@ -137,6 +137,16 @@ export const getApiConfig = () => {
|
|||
throw new Error('Configuration not loaded. Call loadConfig() first.');
|
||||
}
|
||||
|
||||
// Check for environment variable override
|
||||
if (process.env.REACT_APP_BACKEND_URL) {
|
||||
const backendUrl = process.env.REACT_APP_BACKEND_URL.replace(/\/$/, ''); // Remove trailing slash if present
|
||||
console.log('ConfigLoader: Using backend URL from env:', backendUrl);
|
||||
return {
|
||||
videoProcessingEndpoint: `${backendUrl}/api/process`,
|
||||
chunkedUploadEndpoint: backendUrl
|
||||
};
|
||||
}
|
||||
|
||||
return cachedConfig.api || {};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue