Skip to content

fix(v9/nextjs): Align tunnel request matching in middleware with tunnel rewrite - #24760

Merged
chargome merged 2 commits into
v9from
feat/backport-24499-v9
Sep 28, 2026
Merged

chargome merged 2 commits into
v9from
feat/backport-24499-v9

Conversation

@chargome

Copy link
Copy Markdown
Member

Backport of: #24499

Differences to the original PR

  • packages/nextjs/src/common/utils/tunnelPathnameMatch.ts: this file doesn't exist on v9, so it's added here with only isSentryTunnelRequest. isPathnameUnderSentryTunnelRoute is left out because nothing on v9 uses it.
  • On v9 the middleware checked tunnel requests with a plain pathname.startsWith(tunnelRoute), so a path like /api/things counted as a tunnel request for /api/t. develop fixed that in an earlier PR. The new exact matching fixes it on v9 too, so the test for that case from develop is included here.

@chargome chargome self-assigned this Sep 25, 2026
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.79 kB added added
@sentry/browser - with treeshaking flags 22.36 kB added added
@sentry/browser (incl. Tracing) 39.66 kB added added
@sentry/browser (incl. Tracing, Replay) 77.93 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.71 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 82.63 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 94.76 kB added added
@sentry/browser (incl. Feedback) 40.48 kB added added
@sentry/browser (incl. sendFeedback) 28.48 kB added added
@sentry/browser (incl. FeedbackAsync) 33.37 kB added added
@sentry/react 25.55 kB added added
@sentry/react (incl. Tracing) 41.62 kB added added
@sentry/vue 28.24 kB added added
@sentry/vue (incl. Tracing) 41.45 kB added added
@sentry/svelte 23.81 kB added added
CDN Bundle 25.18 kB added added
CDN Bundle (incl. Tracing) 39.42 kB added added
CDN Bundle (incl. Tracing, Replay) 75.55 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 81.02 kB added added
CDN Bundle - uncompressed 73.45 kB added added
CDN Bundle (incl. Tracing) - uncompressed 116.86 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.75 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 244.56 kB added added
@sentry/nextjs (client) 43.66 kB added added
@sentry/sveltekit (client) 40.08 kB added added
@sentry/node 169.4 kB added added
@sentry/node - without tracing 100.54 kB added added
@sentry/aws-serverless 128.7 kB added added

chargome added a commit that referenced this pull request Sep 28, 2026
v9 CI had gone red for reasons unrelated to the changes being tested
(see #24760): dependency ranges in the e2e test apps kept floating to
newer releases.

- Next.js `latest` variants now install `next@15`, and the canary
variants are removed. v9 does not support Next.js 16, and there are no
Next.js 15 canaries anymore.
- Test apps whose deps drifted to releases that need Node 22 (nuxt via
cssnano 8, wrangler) or that no longer fit the other pinned versions
(pg-protocol types, `@opentelemetry/api` on TS 3.8, MCP SDK/zod,
remix-oxygen, astro) are pinned to the versions that were current around
the last v9 release.
- node-profiling-cjs/esm, cloudflare-astro and cloudflare-hono had no
active `.npmrc`, so they installed `@sentry/*` from npm (now v11)
instead of the local build. They now use the test registry. The
profiling apps only route the `@sentry` scope because
`@sentry-internal/node-cpu-profiler` is only on npm.
- `geist` is dropped from nextjs-t3 because its OFL-1.1 license fails
the license check. `develop` already did the same.

The optional send-to-sentry jobs still fail because transactions can no
longer be looked up by event ID. `develop` moved those tests to the
trace endpoint, and porting that is left for a follow-up.
cloudflare-astro builds now but fails when deploying to Cloudflare Pages
with an auth error from the Cloudflare API.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@chargome
chargome marked this pull request as ready for review September 28, 2026 17:04
@chargome
chargome requested a review from nicohrubec September 28, 2026 17:04
@chargome
chargome merged commit c122aac into v9 Sep 28, 2026
47 checks passed
@chargome
chargome deleted the feat/backport-24499-v9 branch September 28, 2026 17:08
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.

2 participants