🐛 BUG: does Miniflare.dispatchFetch
handle redirect Response from worker script?
#5018
Labels
bug
Something that isn't working
Which Cloudflare product(s) does this pertain to?
Miniflare
What version(s) of the tool(s) are you using?
miniflare@3.20240129.2
What version of Node are you using?
20.11.1
What operating system and version are you using?
Linux 6.7 Arch Linux
Describe the Bug
Observed behavior
It appears that redirect response (e.g.
302
status) causesError: redirect count exceeded
regardless oflocation
header.Expected behavior
Preferably it returns response from worker script as is with
30x
status andlocation
header, instead of internally undici resolving redirection. I think this is preferred if framework author wants to run their server code on Miniflare by proxying request viadispatchFetch
.Steps to reproduce
I added a reproduction in this repository https://github.com/hi-ogawa/reproductions/tree/main/miniflare-redirect Please let me know if it is concise enough.
(additional context)
I'm currently testing running
ViteRuntime
to run Vite framework server side code inside Workerd/Miniflare. Here a few relevant links:It's mostly working, but I just noticed that react-router/remix's server side redirection isn't working and it appears that it's hitting this bug/limitation of
Miniflare.dispatchFetch
.Please provide a link to a minimal reproduction
https://github.com/hi-ogawa/reproductions/tree/main/miniflare-redirect
Please provide any relevant error logs
I also wrote this in readme of the reproduction repo, but I'll copy-paste it here:
Reveal log
The text was updated successfully, but these errors were encountered: