gravitino icon indicating copy to clipboard operation
gravitino copied to clipboard

Fixed UI routes ending in WebUIFilter

Open JoelVR2k opened this issue 1 month ago • 0 comments

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.

JoelVR2k avatar Nov 16 '25 18:11 JoelVR2k