Hey all using SvelteKit in Cloudflare
Hey all, using SvelteKit in Cloudflare Pages/Functions, and running locally via
wrangler pages dev -e dev -- vite dev
(proxy mode). Unfortunately it seems that a Location
header doesn't make it all the way back to my browser but instead wrangler/workerd/mf is following the redirect internally. Is there a way to enable this passthrough? I saw the attached note but not sure if that's the same thing. Strangely, it seems that other SvelteKit headers are passed through, i.e X-Sveltekit-Page
, but Location isn't.1 Reply
For those who run into a similar thing later - I ended up just populating it at runtime and not using wrangler - https://github.com/sveltejs/kit/issues/4292#issuecomment-1550596497
GitHub
Platform context fallbacks · Issue #4292 · sveltejs/kit
Describe the problem When developing with svelte-kit dev, the event.platform object is always empty, with no great way to mock it. When building using an adapter like Cloudflare Workers, event.plat...