-
Notifications
You must be signed in to change notification settings - Fork 987
fix: restore original url before passing request to miniflare #10593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: restore original url before passing request to miniflare #10593
Conversation
🦋 Changeset detectedLatest commit: 5ee7f1d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
928f0bb
to
bca6784
Compare
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
Hi @BlankParticle. Thanks for the PR. The Please could you add a test in |
I wasn't aware this was a problem with assets too, but yeah we can probably figure out something for that I will add the tests for now |
bca6784
to
8f411d7
Compare
8f411d7
to
2a4ded0
Compare
2a4ded0
to
58b7eff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for the PR!
Fixes #9567
When using the
base
config with vite, vite dev server strips out the base part from the urlthis means the worker receives a url with
/api/test
in production but/test
in vite devwe already has to fix this behaviour when working with
/cdn-cgi
urls for triggers and restore the originalUrlso this PR actually restores that URL for all requests that are passed into miniflare