Commit 43b446a
committed
fix(prod-server): serve static files for beforeFiles rewrite targets
Add static file serving for beforeFiles rewrite targets in the Pages
Router production server. This matches Next.js behavior where beforeFiles
rewrites can resolve to static files in public/ or other filesystem paths.
The fix passes middleware headers (including Set-Cookie) to the static
file response, ensuring middleware-set headers appear on static assets.
This resolves the issue from PR cloudflare#776 where beforeFiles rewrites that
target static files were not being served correctly.1 parent 29dde11 commit 43b446a
1 file changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1563 | 1563 | | |
1564 | 1564 | | |
1565 | 1565 | | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1566 | 1569 | | |
1567 | 1570 | | |
1568 | 1571 | | |
| |||
1573 | 1576 | | |
1574 | 1577 | | |
1575 | 1578 | | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
1576 | 1595 | | |
1577 | 1596 | | |
1578 | 1597 | | |
| |||
0 commit comments