Repository navigation
fix(ui): preserve nested ui path segments - #2119
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe UI static asset handler now strips ChangesUI static asset path handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
b3671be to
d6717ee
Compare
✅ PR Title Formatted CorrectlyThe title of this PR match the correct format. Thank you! |
c-thiel
left a comment
There was a problem hiding this comment.
Good catch, thanks @sivakumar-mahalingam
(cherry picked from commit afed1cd)
Summary
Strip only the leading
ui/prefix when resolving UI static asset paths.The previous implementation removed every occurrence of
ui/, which could map a malformed or nested path to a different existing asset. For example,/ui/duckdb/ui/duckdb-eh.wasmincorrectly resolved toduckdb/duckdb-eh.wasm.Testing
Added a regression test verifying that:
/ui/duckdb/duckdb-eh.wasmreturns200 OK./ui/duckdb/ui/duckdb-eh.wasmreturns404 Not Found.Closes #2118
Summary by CodeRabbit
ui/prefix is removed only when it appears at the start of a path, allowing embedded assets with that prefix to load correctly. Any laterui/segment remains part of the asset path and is not treated as a prefix, so the request returns not found.