Open smnschmnck opened 4 months ago
I have the issue that redirects do redirect but the url in the browser's url bar stays unchanged. This happens only when wrangler does proxy, not in production and not when accessing the underlying SvelteKit server directly.
Which Cloudflare product(s) does this pertain to?
Pages
What version(s) of the tool(s) are you using?
3.32.0 [Wrangler]
What version of Node are you using?
20.11.1
What operating system and version are you using?
Fedora Linux 39
Describe the Bug
Observed behavior
When using redirects to external pages in Astro like this:
return context.redirect("https://example.com")
I get this error:[wrangler] Could not proxy request: TypeError: fetch failed
.I bootstrapped my project with the
npm create cloudflare@latest my-astro-app -- --framework=astro
command.The bug only happens when I start the dev server with the
npm run pages:dev
command. If I start vianpm run dev
everything works as expected but this way the Cloudflare bindings cannot be used so I need to use the pages command.Expected behavior
The redirect should redirect to the desired page as expected.
Steps to reproduce
npm create cloudflare@latest my-astro-app -- --framework=astro
commandreturn context.redirect("https://example.com")
in an API route or create a redirect in an Astro pagenpm run pages:dev
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response