attempting to reload /index with any user-generated reload
This commit is contained in:
parent
158d52dab4
commit
31eb7c0439
2
.env
2
.env
|
@ -1,2 +1,2 @@
|
|||
REACT_APP_API_URL=http://zbox.local:8080
|
||||
REACT_APP_API_URL=http://nebula1:8080
|
||||
|
||||
|
|
|
@ -20,4 +20,4 @@ RUN npm run build
|
|||
FROM scratch
|
||||
|
||||
# Copy the build output from the previous stage to a directory
|
||||
COPY --from=build-stage /app/build ./build
|
||||
COPY --from=build-stage /app/build ./build
|
||||
|
|
|
@ -4,6 +4,11 @@ import './index.css';
|
|||
import App from './App';
|
||||
import reportWebVitals from './reportWebVitals';
|
||||
|
||||
const path = window.location.pathname;
|
||||
if (path !== '/' && !path.startsWith('/api/v1/')) {
|
||||
window.history.replaceState(null, '', '/');
|
||||
}
|
||||
|
||||
// Log the environment variables
|
||||
console.log('REACT_APP_API_URL:', process.env.REACT_APP_API_URL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue