You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.4 KiB
2.4 KiB
| title | status | type | priority | created_at | updated_at |
|---|---|---|---|---|---|
| [TRIAGE] Cloudflare Pages SPA routing — 404 fallback config for client-side Yew router | completed | task | critical | 2026-03-10T23:32:11Z | 2026-03-10T23:32:11Z |
- File content:
/* /index.html 200 - The
200code is a Cloudflare Pages "proxy" (not a redirect): it servesindex.htmlcontent while preserving the original URL in the browser. This is required for Yew's BrowserRouter to function correctly on direct navigation and page reloads. - The file lives at the
quotesdb/project root and is copied intodist/by Trunk via<link data-trunk rel="copy-file" href="_redirects"/>inindex.html. - Cloudflare Pages processes
_redirectsautomatically from the uploaded artifact — no OpenTofu changes are needed inae886f. - The
/api/*Worker routes are claimed at the Cloudflare routing layer before Pages processes requests, so the/* /index.html 200catch-all does not interfere with the API.
Options 2 (_headers) and 3 (duplicate 404.html) were ruled out:
_headersdoes not fix routing — it only sets response headers.- A
404.htmlcopy ofindex.htmlreturns HTTP 404 status, which is incorrect for valid SPA routes and can harm SEO and caching behaviour.
Implementation ticket: 9ef703 — creates the _redirects file and adds the Trunk copy-file
directive to index.html. dc3d2b (Trunk.toml) depends on 9ef703 to ensure the copy-file
line is not accidentally overwritten. ae886f (Pages resource) updated with resolved notes.