fix: proxy-compatible URLs for hero_compute_ui (#33) #47
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_compute!47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/css/,/js/,/rpc) which break behind hero_proxy at/hero_compute_ui/BASE_PATHJS detection +<base>tag pattern (same as other Hero UIs)BPvariableTest plan
http://localhost:9090/hero_compute_ui/(was 404)Ref: lhumina_code/home#33
7488023825d66b95e486@mik-tf A few issues with this PR before we can merge:
The UI is served on port 9001 at /. There's no reason to change the base URL to /hero_compute_ui/. If you're trying to support hero_proxy, the server already has
HERO_COMPUTE_BASE_PATHenv var for this, the base path should come from the server via /api/config, not be guessed from the URL with a regex.explorerRpc is still using an absolute path. Explorer mode will break behind the proxy.
The console connects via ws://host/console/{vm_sid}, this isn't prefixed with BP anywhere. Console will break behind the proxy.
Adding a dynamic tag changes how ALL relative URLs resolve on the page, WebSocket URLs, anchor href="#", image refs, etc. This is known to cause hard-to-debug issues. A safer approach is to keep CSS/JS as absolute paths and only prefix
fetch()calls with a server-provided base path variable.This PR is based on old code; it still has chvm_version references. We've renamed all
chvm→my_hypervisoron development. Please rebase.This only works if the proxy path matches the binary name. If someone mounts it at
/cloud/or/compute/, it breaks. Use the server-provided config instead.Recommendation: Close this PR. If proxy support is needed, we should implement it properly using the existing
HERO_COMPUTE_BASE_PATHenv var injected via /api/config, not URL guessing.Pull request closed