fix: [ENG-2345] serve webui SPA fallback when install path contains a dotfile#528
fix: [ENG-2345] serve webui SPA fallback when install path contains a dotfile#528
Conversation
… dotfile res.sendFile() was called with an absolute path to dist/webui/index.html. send's default dotfiles: 'ignore' scans every component of the provided path, so global installs under ~/.nvm/... (or any parent starting with '.') returned 404 on hard reloads of SPA routes like /contexts. Pass so the dotfile check only applies to the relative 'index.html'.
|
Claude finished @wzlng's task in 1m 15s —— View job Code Review — Score: 4/5
SummaryThe fix is correct and well-targeted. The removal of the now-unused What's good
Issues found
The |
Replace 'as AddressInfo' cast with a type guard, tighten the SPA fallback comment, and add tests for the normal install path and the missing-webuiDistDir branch.
|
Claude finished @wzlng's task in 1m 14s —— View job Code Review — Score: 5/5
The follow-up commit (
Final state
Ready to merge. |
res.sendFile() was called with an absolute path to dist/webui/index.html. send's default dotfiles: 'ignore' scans every component of the provided path, so global installs under ~/.nvm/... (or any parent starting with '.') returned 404 on hard reloads of SPA routes like /contexts. Pass 'root' so the dotfile check only applies to the relative 'index.html'.