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.1 KiB
2.1 KiB
| title | status | type | priority | created_at | updated_at |
|---|---|---|---|---|---|
| [TRIAGE] Local dev CORS and Trunk API proxy config (trunk serve proxying to api on different port) | completed | task | critical | 2026-03-10T23:32:09Z | 2026-03-10T23:32:09Z |
Rationale:
- Mirrors the production architecture: Cloudflare routes
/api/*to the Worker at the same domain as the Pages site. No CORS configuration is needed in production either. - Frontend uses relative URLs (
/api/quotes, nothttp://localhost:3000/api/quotes). The same paths work in both dev (Trunk proxies them) and production (Cloudflare routes them). - Zero CORS configuration: no
tower-httpCORS middleware, noAccess-Control-Allow-Originheaders. Simpler API, smaller attack surface. - Port: API runs on
localhost:3000viacargo run(plain Axum/Tokio for local dev).
Implementation:
Trunk.toml— add[[proxy]] rewrite = "/api" backend = "http://localhost:3000". See ticket 00d6d7.src/bin/ui/api.rs— use relative URLs only. See ticket 1e6a09.
Updated tickets: dc3d2b (Trunk.toml setup), 1e6a09 (API client module). Created ticket: 00d6d7 (dedicated implementation task for the proxy config).
`chore(quotesdb): resolve triage — local-dev-cors-and-trunk-api-proxy-config-trunk-serve-proxyi`