-
Notifications
You must be signed in to change notification settings - Fork 4.1k
ui: use relative instead of absolute paths for recently introduced DB routes #91429
Description
Describe the problem
When running the DB Console behind a proxy that has a different base URL, it's necessary for existing XHR requests to be made relative to that base path that's being proxied to the cluster (say: http://example.com/my-cluster/prod-cluster/...). This ensures that all requests in addition to the initial asset requests can complete successfully.
It appears that the uiconfig and api/v2 routes were configured as absolute instead of relative in the code, which breaks them when behind a proxy that changes the base URL.
To Reproduce
Run DB Console and CRDB behind an HTTP proxy with a base URL different from /.
which tells us that /uiconfig loaded incorrectly
and
Expected behavior
DB Console runs as expected and pages load successfully without errors.
Environment:
- CockroachDB version: 22.2.0-beta5
- Client app: DB Console
Jira issue: CRDB-21257
gz#16498
gz#16586
gz#17984
Epic CC-25593


