Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 404 Not Found error when baseUrl is not / #941

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

rinsuki
Copy link
Contributor

@rinsuki rinsuki commented Jan 5, 2025

Fix #854
Fix #889

This pull request fixes a bug which hubble-ui will not work if hubble.ui.baseUrl is specified to other than /.

after this pull-request, hubble-ui now correctly consider <base href> tag (if available) for:

  • API path (previously hardcoded to ${location.origin}/api/)
  • react-router's base path (previously not specified, which causes default value: /)

side note: <base href> is changed by cillium's nginx, see https://github.com/cilium/cilium/blob/5a4fdc967a51146c15b65e5401ecb5d7decdd8d2/install/kubernetes/cilium/templates/hubble-ui/_nginx.tpl#L31

@rinsuki rinsuki requested a review from a team as a code owner January 5, 2025 11:33
@rinsuki rinsuki requested review from geakstr and removed request for a team January 5, 2025 11:33
@rinsuki rinsuki changed the title fix: 404 Not Found error when basePath is not / fix: 404 Not Found error when baseUrl is not / Jan 5, 2025
@geakstr geakstr removed their request for review January 7, 2025 13:56
@geakstr geakstr assigned geakstr and yannikmesserli and unassigned geakstr Jan 7, 2025
@yannikmesserli yannikmesserli self-requested a review January 13, 2025 09:54
@yannikmesserli yannikmesserli added this to the v0.13.2 milestone Jan 13, 2025
Copy link
Contributor

@yannikmesserli yannikmesserli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good! Tested for when deployed on "/" as described by Isovalent's docs, I guess you've tested it for different path?

@rinsuki
Copy link
Contributor Author

rinsuki commented Jan 13, 2025

Yes, I tested with different root path /hubble-ui/.

Copy link
Member

@rolinh rolinh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@yannikmesserli
Copy link
Contributor

The Cypress Cloud is decommissioned, I need to removed it (and possibly migrate to Playwright) let's ignore their failure for now and merge. Thanks!

@rolinh rolinh merged commit fd6924b into cilium:master Jan 13, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HubbleUI will not load on a Prefix v0.13.0 doesn't work with baseUrl
4 participants