Repository navigation
fix: 301 every www.seofixkit.com request onto the apex host - #89
Conversation
There was a problem hiding this comment.
nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Warning Review limit reached
Next review available in: 18 minutes Limit details: You’ve used the included review currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9216b7a7e
ℹ️ 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".
| // `true` routes every request through the Worker (canonical-host redirect | ||
| // included); an array routes only the listed paths. | ||
| assert.equal( | ||
| runWorkerFirst === true || Array.isArray(runWorkerFirst), |
There was a problem hiding this comment.
Require run_worker_first to stay global
If run_worker_first is reverted to the pre-fix path array, this assertion still succeeds and every path checked below was already present in that array. The worker redirect tests call worker.fetch directly, bypassing Cloudflare asset routing, and the live spot-check is opt-in, so npm run check would not detect the recurrence of www static assets and SPA fallbacks being served directly. Assert that this value is true to pin the behavior this commit depends on.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
… SPA-fallback paths Rebased onto main. The config half of this branch (wrangler.jsonc `run_worker_first: true` and the README canonical-host paragraph) has already landed on main via a later PR, so what remains is the extra regression coverage this branch adds on top of it: - worker/index.test.mjs: fold `/.well-known/security.txt`, `/assets/waitlist-hero.jpg` and a SPA-fallback path (`/some-random-client-path`) into the existing www-redirect loop, so a regression to the `run_worker_first` path-array form fails loudly for well-known paths and client-routed paths, not just top-level assets. - scripts/live-promise-spot-check.mjs: add live spot-checks for the same two new shapes (well-known path, SPA-fallback path) alongside the existing favicon check, and document why the static-asset check exists. - scripts/live-promise-spot-check.test.mjs: pin the new spot-check paths and bump the expected result count 22 -> 24. Conflict resolution kept main's landed side for wrangler.jsonc (`not_found_handling: "404-page"` plus the run_worker_first comment), the README paragraph, the stricter `run_worker_first: true` promise-audit assertion, and the comment-stripping JSONC parser in pages.test.mjs -- this branch's older versions of those would have reverted main or crashed on the now-commented wrangler.jsonc.
3dfa275 to
d0ce23a
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…7783adc (#171) Item 38147c59f9 (canonicalize www.seofixkit.com onto the apex host with 301 redirects and apex-only canonicals/sitemap) is already implemented, tested, and live on origin/main. PR #70 (commit c05fae5, 2026-08-09) shipped the 301 + apex-only canonicals/robots/sitemap/llms.txt; #107 added run_worker_first so www static assets 301 too; #89 hardened the live spot-check. Re-verified today against origin/main at 7783adc: test:worker-dispatch 14/14, test:public-pages 15/15, test:promise-audit 71/71; live www root, deep path with query, sitemap.xml, llms.txt, favicon.svg, well-known and SPA-fallback paths all 301 to the apex with path/query intact; apex sitemap/robots/canonicals are apex-only. No code change needed; report only. Co-authored-by: fleet-dispatch <fleet-dispatch@local> Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
What
Completes the canonical-host item: every
www.seofixkit.comrequest must 301-redirect onto the apex host with path+query intact, keeping canonicals/sitemap apex-only.PR #70 covered worker-routed paths but left a gap:
assets.run_worker_firstwas a path list, so static assets (/.well-known/*,security.txt, icons,/assets/*) and any SPA-fallback path were served 200 directly from www — verified live:Fix
wrangler.jsonc:"run_worker_first": true— every request hits the Worker first, so the www→apex 301 fires before any asset/SPA serving. Apex behavior unchanged: the Worker'sASSETS.fetchfallthrough still serves static assets and the SPA shell (same path/api/unknown-routeuses today).JSON.parseonwrangler.jsonc).Pins (regression-proof)
worker/index.test.mjs: www 301 pinned for/.well-known/security.txt,/assets/*, and arbitrary SPA-fallback paths.scripts/live-promise-spot-check.mjs+ test: two new live checks (www/.well-known/security.txt,www/unknown-spa-path) that fail the live promise audit if the deployed config regresses to a path list.pages.test.mjs+promise-audit.test.mjs: acceptrun_worker_first: trueor path array.Verification
npm run check: all suites pass (18 suites, 0 failures), build green.wrangler deploy --dry-run(shielded scratch, per ERRORS.md due to the recurring zero-byte/home/nish/package.json): config accepted,run_worker_first: truevalidated, assets read (15 files).