Commit 017dc45
committed
fix(server): serve docs/index.html at GET / — x402.sentinel.co root was a Cloudflare cache ghost
The deployed server has no root route: GET / returns the JSON 404 and the
HTML page on x402.sentinel.co exists only as a stale Cloudflare edge-cache
copy from 2026-06-13. Same root cause left /llms.txt serving its stub —
docs/ was never bundled into the Docker image.
- index.ts: resolve docs/ once (image layout /app/docs, checkout ../../docs),
serve docs/index.html at GET / with Cache-Control: public, max-age=300 so
the edge can never pin a copy for weeks; 301 /index.html -> /; llms.txt
route now uses the same resolver (fixes the live stub).
- Dockerfile: build from repo-root context and COPY docs ./docs.
- build.yml: context . and rebuild the image on docs/** changes too.
Verified: tsc clean; smoke test on :4920 — GET / 200 text/html (latest docs
fingerprint), GET /?x=1 200, /index.html 301, /llms.txt real content.1 parent bcbecba commit 017dc45
3 files changed
Lines changed: 47 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | | - | |
| 8 | + | |
7 | 9 | | |
8 | | - | |
9 | | - | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
599 | 628 | | |
600 | 629 | | |
601 | 630 | | |
602 | | - | |
| 631 | + | |
603 | 632 | | |
604 | | - | |
| 633 | + | |
605 | 634 | | |
606 | 635 | | |
607 | | - | |
608 | 636 | | |
609 | 637 | | |
610 | | - | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
611 | 642 | | |
612 | 643 | | |
613 | 644 | | |
| |||
715 | 746 | | |
716 | 747 | | |
717 | 748 | | |
| 749 | + | |
718 | 750 | | |
719 | 751 | | |
720 | 752 | | |
| |||
0 commit comments