Commit 8c1a129
committed
fix(@angular/build): skip HTML fallback for dotfile requests
The HTML fallback middleware currently rewrites dotfile requests
(e.g., /.env, /.npmrc) to /index.html, returning 200 instead of 404.
This change skips the SPA fallback when the last URL path segment
starts with a dot, providing a small defense-in-depth improvement
for the dev server.
Made-with: Cursor1 parent 4643a8a commit 8c1a129
File tree
1 file changed
+9
-0
lines changed- packages/angular/build/src/tools/vite/middlewares
1 file changed
+9
-0
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| |||
0 commit comments