hashi-ui
hashi-ui copied to clipboard
PROXY_ADDRESS breaks direct access w/o reverse proxy
Using PROXY_ADDRESS breaks access to hashi-ui directly using http://ip:port address.
Reproduce:
- Skip setting PROXY_ADDRESS, configuration:
CONSUL_ADDR="http://consul.service.consul:8500"
CONSUL_ENABLE="true"
CONSUL_READ_ONLY="true"
NOMAD_ADDR="http://nomad-servers.service.consul:4646"
NOMAD_ENABLE="true"
SERVICE_IMAGE="jippi/hashi-ui"
SERVICE_VERSION="v1.3.8"
NOMAD_READ_ONLY="true"
NOMAD_HIDE_ENV_DATA="true"
Result: hashi-ui reachable at http://localhost:3000, redirects to http://localhost:3000/nomad/, works as expected.
- Set PROXY_ADDRESS="/hashi-ui", otherwise same config as above
Result: hashi-ui at localhost:3000 redirects to http://localhost:3000/hashi-ui/nomad/ and shows Error: Unable to connect to the backend...
.
Route through traefik (http://traefik:80/hashi-ui) works, configured as:
"traefik.enable=true",
"traefik.http.routers.hashi-ui.entrypoints=api",
"traefik.http.routers.hashi-ui.rule=PathPrefix(`/hashi-ui`)",
"traefik.http.routers.hashi-ui.middlewares=hashi-ui_stripprefix",
"traefik.http.middlewares.hashi-ui_stripprefix.stripprefix.prefixes=/hashi-ui",
So the sum behavior above is that I can't get hashi-ui working both with direct access and via traefik at the same time. Did I configure something wrong, or is this a bug, because I would've expected the direct access to still work?
The same issue!