attempting to reload /index with any user-generated reload

This commit is contained in:
Steve White 2024-10-29 13:20:42 -05:00
parent 158d52dab4
commit 31eb7c0439
3 changed files with 7 additions and 2 deletions

2
.env
View File

@ -1,2 +1,2 @@
REACT_APP_API_URL=http://zbox.local:8080
REACT_APP_API_URL=http://nebula1:8080

View File

@ -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

View File

@ -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);