error-handling #1
2
.env
2
.env
|
@ -1,2 +1,2 @@
|
||||||
REACT_APP_API_URL=http://zbox.local:8080
|
REACT_APP_API_URL=http://nebula1:8080
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,11 @@ import './index.css';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
import reportWebVitals from './reportWebVitals';
|
import reportWebVitals from './reportWebVitals';
|
||||||
|
|
||||||
|
const path = window.location.pathname;
|
||||||
|
if (path !== '/' && !path.startsWith('/api/v1/')) {
|
||||||
|
window.history.replaceState(null, '', '/');
|
||||||
|
}
|
||||||
|
|
||||||
// Log the environment variables
|
// Log the environment variables
|
||||||
console.log('REACT_APP_API_URL:', process.env.REACT_APP_API_URL);
|
console.log('REACT_APP_API_URL:', process.env.REACT_APP_API_URL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue