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 — Nuxt managed tunnel on Cloudflare drops the request body · Issue #26364 · getsentry/sentry-javascript

Nuxt managed tunnel on Cloudflare drops the request body #26364

New issue
Copy link
New issue
Copy link
Closed
#26365
Closed
Nuxt managed tunnel on Cloudflare drops the request body#26364
#26365
Copy link
Assignees
isaacs
Labels
Nuxt

Description

@sentry-junior
sentry-junior
bot
opened on Nov 13, 2026
Issue body actions

On Nuxt 4 (Nitro v2) with the cloudflare_module preset, the managed tunnel never answers. sentryCloudflareNitroPlugin drops the body of tunnel requests, so the SDK's tunnel handler ignores them and the app handles them instead. With an auth middleware, as in the nuxt-4 e2e app, the browser's tunnel requests get a 401.

Root cause

  • In the localFetch proxy of packages/nuxt/src/runtime/plugins/sentry-cloudflare.server.ts, the request passed to wrapRequestHandler gets its body only if isServedTunnelRequest({ method, url }) matches.
  • That check runs before wrapRequestHandler creates the per-request client. No client is current at that point, so getServedTunnel() returns nothing and the check is always false.
  • handleServedTunnelRequest() in wrapRequestHandlerWithInit skips a request without a body, so the request falls through to the app.
  • The check came in with feat(cloudflare): Answer managed tunnel requests in withSentry #25999.

Evidence (from a local wrangler dev run of the nuxt-4 e2e app, built without sentry.server.config.ts as the Cloudflare setup documents):

  • Unpatched, every tunnel POST to /app/qpo967 got 401 blocked by user auth, the first one and later ones alike.
  • With a log added at that check and the body passed unconditionally, the log printed SERVED? false /app/qpo967 for each tunnel POST. The tunnel then answered 200 and forwarded the envelope to the DSN host.
  • With the body passed on every request, tunnel-request-body.test.ts fails: the JSON body of a non-tunnel POST /api/post-error shows up as request.data on its error event. So the body can't just be passed for all requests.
  • The deleted nuxt-4-cloudflare tunnel test didn't catch this. Built from develop, its tunnel POST got 200 text/html from app.vue and forwarded nothing.

Reproduction

  • In fix(nuxt): Fix db0 and Cloudflare span data, run nuxt-4 on Bun, Deno and Cloudflare #26285, the optional variant nuxt-4 (tunnel-basepath-cloudflare) reproduces it. Its two managed-tunnel tests fail with Expected: 200, Received: 401. Once this is fixed, that variant should move to the required variants.

Related: #24838, #26285

via Isaac Schlueter.

--

View Session [Sentry]

Activity

  1. sentry-junior
    added
    Nuxt
    on Nov 13, 2026
  2. linear-code commented on Nov 13, 2026

    @linear-code
    linear-codeBot
    on Nov 13, 2026 – with Linear Code
    More actions

    JS-4102

  3. sentry-junior
    assigned
    isaacs
    on Nov 13, 2026
  4. isaacs commented on Nov 13, 2026

    @isaacs
    isaacs
    on Nov 13, 2026
    Member
    More actions

    Comment thread that spawned this: #26285 (comment)

  5. sentry-junior
    added a commit that references this issue on Nov 17, 2026

    fix(nuxt): Answer managed tunnel requests on Cloudflare

    This issue will close once commit 0a0de1a is merged into the 'develop' branch.
    0a0de1a
  6. isaacs
    added 3 commits that reference this issue on Nov 17, 2026

    fix(nuxt): Fix db0 and Cloudflare span data, run nuxt-4 on Bun, Deno …

    8c8f0d4

    fix(nuxt): Answer managed tunnel requests on Cloudflare

    535d3e1

    fix(nuxt): Answer managed tunnel requests on Cloudflare (#26365)

    13f8b42
  7. isaacs
    closed this as completedin #26365on Nov 17, 2026
  8. github-actions commented on Nov 17, 2026

    @github-actions
    github-actionsBot
    on Nov 17, 2026 – with GitHub Actions
    Contributor
    More actions

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #26365, which was included in the 11.14.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @isaacs
    isaacs

Labels

Nuxt

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.