Remove env-config.js (#9331)
Fixes #5340 which had been open for a long time
This commit is contained in:
@ -12,12 +12,12 @@ const getDefaultUrl = () => {
|
||||
) {
|
||||
// In development environment front and backend usually run on separate ports
|
||||
// we set the default value to localhost:3000.
|
||||
// It dev context, we use env vars to overwrite it
|
||||
// In dev context, we use env vars to overwrite it
|
||||
return 'http://localhost:3000';
|
||||
} else {
|
||||
// Outside of localhost we assume that they run on the same port
|
||||
// because the backend will serve the frontend
|
||||
// It prod context, we use env-config.js + window var to ovewrite it
|
||||
// In prod context, we use index.html + window var to ovewrite it
|
||||
return `${window.location.protocol}//${window.location.hostname}${
|
||||
window.location.port ? `:${window.location.port}` : ''
|
||||
}`;
|
||||
|
||||
Reference in New Issue
Block a user