gravitino
gravitino copied to clipboard
Fixed UI routes ending in WebUIFilter
What changes were proposed in this pull request?
This pull request fixes the routing logic in WebUIFilter to correctly resolve UI paths that either:
- End with a trailing slash
- 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.