error-handling #1

Merged
stwhite merged 24 commits from error-handling into main 2024-10-30 15:19:49 +00:00
3 changed files with 7 additions and 2 deletions
Showing only changes of commit 31eb7c0439 - Show all commits

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 FROM scratch
# Copy the build output from the previous stage to a directory # 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 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);