Commit af9865b
Worker: run_worker_first so dynamic / handler actually runs
Cloudflare Workers Static Assets serves exact-match files directly
from the edge without invoking the Worker by default. That meant my
new /-intercepting handleIndex was never reached for /index.html —
CF kept returning the cached static index.html.
run_worker_first = true makes every request go through the Worker
first; static assets are still served via env.ASSETS.fetch when the
Worker dispatches to it.
Also adds a console.error in the / fallback path so future silent
failures surface in wrangler tail.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 528c69d commit af9865b
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| 24 | + | |
0 commit comments