fix: bind product apex routes#19
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc93769c0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "routes": [ | ||
| { "pattern": "crabfleet.ai/*", "zone_name": "crabfleet.ai" }, | ||
| { "pattern": "www.crabfleet.ai/*", "zone_name": "crabfleet.ai" }, |
There was a problem hiding this comment.
Use the DNS-scoped token for product routes
In deployments that follow the documented secret split, CLOUDFLARE_API_TOKEN only has Workers/D1 deploy permissions while crabfleet.ai DNS/route permissions live in CLOUDFLARE_DNS_API_TOKEN (README.md lines 136-141, workflow lines 56-88). Putting these routes in wrangler.product.jsonc makes the earlier pnpm deploy:product step try to upsert Workers Routes in the crabfleet.ai zone before the DNS-scoped Ensure domains step can create the same routes, so CI will fail for the documented setup; keep route creation in the convergence script or deploy this config with the DNS-scoped token.
Useful? React with 👍 / 👎.
Summary
Bind both
crabfleet.ai/*andwww.crabfleet.ai/*directly in the source-controlled product Worker config.Production verification after #18 showed the apex route using the new product router, while
wwwcould still bypass it and reach GitHub Pages directly.Verification
pnpm checkpnpm test(45 tests)pnpm deploy:product --dry-rungit diff --check