GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(browser): Send same-origin string tunnels as `application/x-sentry-envelope` by logaretm · Pull Request #26299 · getsentry/sentry-javascript

Conversation

@logaretm

@logaretm logaretm commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

While writing the docs for the new tunnel API i realized we have a discrepency in behavior regarding the headers set on a tunnel request.

Before: We set the application/x-sentry-envelope only if the user uses the new API options, so either tunnel: true or tunnel: { path: '/monitor' }. So the tunnel: '/monitor' option doesn't set that header.

The reasoning is we were worried about breaking CORS preflight header checks by adding that header, which is still a valid concern however it would typically apply to requests to a different origin. Requests on the same origin wouldn't trigger a preflight check, so the header has no risk there.

On all SDKs that doesn't really matter, but for Next.js it can break the tunnel if the user uses the new API directly with a fixed path like so:

// instrument.client.ts
Sentry.init({
  tunnel: '/fixed-path'
});

// instrument.server.ts
Sentry.init({
  integrations: [Sentry.serveTunnelIntegration()]
})

The way it works specifically on Next.js is that we match the route on vercel deployments using a re-write rule that targets any path with a application/x-sentry-envelope header, if the user uses the previous snippet the header is never sent so the tunnel never works.

Our shipped PRs wouldn't trigger this issue on their own because the new docs don't recommend this yet. Our merged implementation actually ensures the header to applied, but by accident since we normalize to tunnel: { path } format which uses the new API.

After: Now the distinction is different but more consistent, external URLs won't receive the header, while same origin requests will. This is a safer default.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions

github-actions Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 3b4f402 (PR test merge using develop at 86c5981)

Against: 86c5981 (develop) · base run #65750

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.13 kB +0.51% +151 B 🔺
@sentry/browser - with treeshaking flags 28.28 kB +0.54% +150 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 28.18 kB +0.55% +152 B 🔺
@sentry/browser (incl. Tracing) 52.41 kB +0.1% +51 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 52.41 kB +0.11% +56 B 🔺
@sentry/browser (incl. Tracing, Profiling) 55.38 kB +0.1% +52 B 🔺
@sentry/browser (incl. Tracing, Replay) 92.8 kB +0.05% +46 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.46 kB +0.06% +47 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.55 kB +0.06% +56 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 110.55 kB +0.07% +75 B 🔺
@sentry/browser (incl. Feedback) 47.73 kB +0.34% +159 B 🔺
@sentry/browser (incl. sendFeedback) 35.23 kB +0.46% +159 B 🔺
@sentry/browser (incl. FeedbackAsync) 40.34 kB +0.41% +162 B 🔺
@sentry/browser (incl. Metrics) 31.7 kB +0.5% +156 B 🔺
@sentry/browser (incl. Logs) 31.99 kB +0.5% +157 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.68 kB +0.5% +161 B 🔺
@sentry/react 31.99 kB +0.48% +150 B 🔺
@sentry/react (incl. Tracing) 54.87 kB +0.13% +67 B 🔺
@sentry/vue 38.46 kB +0.18% +69 B 🔺
@sentry/vue (incl. Tracing) 55.43 kB +0.1% +55 B 🔺
@sentry/svelte 30.15 kB +0.51% +150 B 🔺
@sentry/remix (Remix 3 client bundle) 58.03 kB +0.11% +60 B 🔺
CDN Bundle 31.93 kB +0.5% +156 B 🔺
CDN Bundle (incl. Tracing) 53 kB +0.12% +62 B 🔺
CDN Bundle (incl. Logs, Metrics) 34.76 kB +0.54% +184 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 55.51 kB +0.12% +64 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 76.09 kB +0.07% +46 B 🔺
CDN Bundle (incl. Tracing, Replay) 91.26 kB +0.05% +39 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.83 kB +0.07% +62 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 97.4 kB +0.07% +61 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 100 kB +0.08% +71 B 🔺
CDN Bundle - uncompressed 93.34 kB +0.49% +455 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 156.32 kB +0.12% +180 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.87 kB +0.45% +455 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 164.1 kB +0.11% +180 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.5 kB +0.09% +192 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 278.35 kB +0.07% +180 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 286.11 kB +0.07% +180 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 292.05 kB +0.07% +180 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 299.81 kB +0.07% +180 B 🔺
@sentry/nextjs (client) 57.77 kB +0.06% +31 B 🔺
@sentry/sveltekit (client) 52.97 kB +0.09% +45 B 🔺
@sentry/core/server 44.51 kB - -
@sentry/core/browser 14.02 kB - -
@sentry/node 157.81 kB +0.02% +16 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.31 kB - -
@sentry/node - without tracing 97.25 kB +0.03% +21 B 🔺
@sentry/node - without channel injection 138.12 kB +0.02% +19 B 🔺
@sentry/aws-serverless 106.33 kB +0.03% +24 B 🔺
@sentry/cloudflare (withSentry) - minified 204.45 kB - -
@sentry/cloudflare (withSentry) 508.11 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 229.47 kB - -

View base workflow run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 7 not successful, 19 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Failing after 21s Details
❌ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Failing after 31s Details
❌ CI: Optional E2E Tests / E2E nextjs-16-cacheComponents (cloudflare) Test (optional) Failing after 10m Details
❌ CI: Optional E2E Tests / E2E nuxt-5 (tunnel-dev) Test (optional) Failing after 22s Details
❌ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Failing after 27s Details
❌ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Failing after 21s Details
❌ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Failing after 23s Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-orpc Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E astro-7-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Successful in 2m Details
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@logaretm
logaretm marked this pull request as ready for review November 11, 2026 14:15
@logaretm
logaretm requested review from a team, JPeer264 and stephanie-anderson November 11, 2026 14:15
@logaretm
logaretm requested a review from a team as a code owner November 11, 2026 14:15
@javascript-sdk-gitflow
javascript-sdk-gitflow Bot requested a review from msonnb November 11, 2026 14:15
@logaretm
logaretm requested review from s1gr1d and removed request for stephanie-anderson November 11, 2026 14:18
mydea
mydea approved these changes Nov 11, 2026
View reviewed changes
@logaretm
fix(browser): Send same-origin string tunnels as `application/x-sentr…
bf140e1
…y-envelope`
@logaretm
logaretm force-pushed the awad/same-origin-tunnel-content-type branch from be1f0da to bf140e1 Compare November 11, 2026 16:00
@logaretm
logaretm merged commit c491307 into develop Nov 11, 2026
836 of 851 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@logaretm
logaretm deleted the awad/same-origin-tunnel-content-type branch November 11, 2026 17:27
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Nov 16, 2026
publish: getsentry/[email protected] getsentry/publish#10451
Closed
51 tasks done
@nanu1605 nanu1605 mentioned this pull request Nov 27, 2026
chore(deps): take monday's npm updates early nanu1605/jainav-infotech#106
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mydea mydea mydea approved these changes
@JPeer264 JPeer264 Awaiting requested review from JPeer264 JPeer264 was automatically assigned from getsentry/team-javascript-sdks
@msonnb msonnb Awaiting requested review from msonnb
@s1gr1d s1gr1d Awaiting requested review from s1gr1d

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@logaretm @mydea
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.