Skip to content

Umami first-party proxy returns 502 on Cloudflare Workers with @nuxt/scripts 1.3.5+ #889

Description

@niklhut

🐛 The bug

After upgrading @nuxt/scripts from 1.3.3, Umami stopped receiving pageviews and custom events from a Nuxt application deployed as a Cloudflare Module Worker.

The bundled Umami tracker loads successfully from the application’s own origin, but the first-party proxy’s collection request fails with 502 Bad Gateway:

POST https://www.example.com/_scripts/p/analytics.example.net/api/send
502 Bad Gateway

The response is:

{
  "error": true,
  "statusCode": 502,
  "statusMessage": "Bad Gateway",
  "message": "Proxy upstream request failed",
  "data": { "errorName": "TypeError" }
}

The same failure is reproducible with the latest stable release, 1.3.8 (published August 21, 2026). Directly requesting the self-hosted Umami tracker succeeds with 200, so the Umami origin is reachable.

🛠️ To reproduce

N/A

🌈 Expected behavior

The first-party proxy should forward the collection request to:

https://analytics.example.net/api/send

and return the upstream Umami response instead of a 502.

ℹ️ Additional context

Environment:

@nuxt/scripts tested: 1.3.3, 1.3.5, 1.3.8
nuxt: 4.5.2
nitro: 2.13.4
wrangler: 4.123.0
deployment preset: cloudflare-module
Umami: self-hosted

Test matrix:

@nuxt/scripts Cloudflare compatibility configuration Umami proxy
1.3.3 Date 2026-08-17, nodejs_compat 200
1.3.5 Date 2026-08-17, nodejs_compat 502
1.3.8 Date 2026-08-17, nodejs_compat 502

The application intentionally uses Nuxt Scripts’ built-in first-party proxy; disabling the proxy is not a suitable workaround. A rollback pinning @nuxt/scripts to exactly 1.3.3 has been merged after the proxy tests passed locally.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingharlan-agent-ready-to-implementIssue triage found bounded work ready for an implementation Agent.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions