This is a long overdue fix that makes the address of the API server configurable without touching Config.js.
The app only uses REACT_APP_BRIGADE_API_ADDRESS when the development server is running.
REACT_APP_BRIGADE_API_ADDRESS is not defined at build time (e.g. in the Dockerfile), so the address of the API server falls back to window.location.origin + "/api" (i.e. a reverse proxy for the API server, whose address is install-time configurable).
This is a long overdue fix that makes the address of the API server configurable without touching
Config.js
.The app only uses
REACT_APP_BRIGADE_API_ADDRESS
when the development server is running.REACT_APP_BRIGADE_API_ADDRESS
is not defined at build time (e.g. in theDockerfile
), so the address of the API server falls back towindow.location.origin + "/api"
(i.e. a reverse proxy for the API server, whose address is install-time configurable).See https://create-react-app.dev/docs/adding-custom-environment-variables/ for better understanding of how this works.