Skip to content

Conversation

BlankParticle
Copy link

@BlankParticle BlankParticle commented Sep 9, 2025

Fixes #9567

When using the base config with vite, vite dev server strips out the base part from the url
this means the worker receives a url with /api/test in production but /test in vite dev

we already has to fix this behaviour when working with /cdn-cgi urls for triggers and restore the originalUrl
so this PR actually restores that URL for all requests that are passed into miniflare


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because:
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: vite-plugin

@BlankParticle BlankParticle requested review from a team as code owners September 9, 2025 17:28
Copy link

changeset-bot bot commented Sep 9, 2025

🦋 Changeset detected

Latest commit: bca6784

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/vite-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@BlankParticle BlankParticle force-pushed the fix/restore-original-url branch from 8110b15 to 928f0bb Compare September 12, 2025 05:13
@BlankParticle BlankParticle force-pushed the fix/restore-original-url branch from 928f0bb to bca6784 Compare September 12, 2025 05:15
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.

Request url received by worker is incorrect when using vite plugin + base option
1 participant