JoelVR2k opened a new pull request, #9135:
URL: https://github.com/apache/gravitino/pull/9135
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
This pull request fixes the routing logic in WebUIFilter to correctly
resolve UI paths that either:
1. End with a trailing slash
2. Omit a file extension
The filter now:
- Forwards directory paths to index.html
````/ui/section/ → /ui/section/index.html````
- Forwards extension-less UI paths to .html
````/ui/dashboard → /ui/dashboard.html````
This ensures that static HTML pages are correctly served by the Web UI.
### Why are the changes needed?
The previous implementation incorrectly handled directory-style UI routes.
A
request such as:
````
/ui/section/
````
was forwarded to:
````
/ui/section/.html
````
instead of:
````
/ui/section/index.html
````
This caused the UI to render incorrectly and broke navigation on static
exports.
The PR fixes this bug by adding explicit handling for trailing-slash
directory routes.
Fix: #9123
### Does this PR introduce _any_ user-facing change?
Yes.
Requests to UI directories now correctly resolve to index.html pages instead
of returning an invalid .html path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]