Skip to content

fix(vercel): enable ISR passQuery when allowQuery is set - #4792

Merged
pi0 merged 1 commit into
mainfrom
fix/vercel-isr-pass-query
Oct 15, 2026
Merged

pi0 merged 1 commit into
mainfrom
fix/vercel-isr-pass-query

Conversation

@pi0x

@pi0x pi0x commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #4408.

When an isr route rule has a non-empty allowQuery and no passQuery, the generated .prerender-config.json now sets passQuery: true. #4409 and #4599 fixed the runtime side, but Vercel does not forward the query to the function without passQuery, so every per-param cache entry was rendered without the param. An explicit passQuery: false is kept, and isr: true, numeric isr and empty allowQuery are unchanged.

I checked this on real Vercel with allowQuery: ["lang"]. On main, /products/a?lang=es reached the handler with no query. With this change the handler sees lang=es, ?lang=es and ?lang=fr are cached separately with the right content, params not in allowQuery are still dropped, and __isr_route does not leak into the query.

🤖 Generated with AI assistant

@pi0x
pi0x requested a review from pi0 as a code owner October 15, 2026 08:57
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nitro.build Ready Ready Preview Oct 15, 2026 8:57am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8d900bcb-51db-4912-a84c-843507235e1d
📥 Commits

Reviewing files that changed from the base of the PR and between 6327f36 and ceeff58.

📒 Files selected for processing: 5
  • docs/2.deploy/20.providers/vercel.md
  • src/presets/vercel/types.ts
  • src/presets/vercel/utils.ts
  • src/types/route-rules.ts
  • test/presets/vercel.test.ts
+---------------------------------------------+
| HD, 4K, 8K...I see bugs in all resolutions. |
+---------------------------------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitro@4792

commit: ceeff58

@pi0
pi0 merged commit 9d34a3c into main Oct 15, 2026
14 of 15 checks passed
@pi0
pi0 deleted the fix/vercel-isr-pass-query branch October 15, 2026 09:01

This branch was successfully deployed

1 active deployment
Preview — ceeff58b Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vercel ISR: isrRouteRewrite drops the entire query string when x-now-route-matches is present (allowQuery/passQuery params never reach the render)

2 participants