Open probablykasper opened 1 year ago
I suspect that this line https://github.com/sveltejs/kit/blob/master/packages/kit/src/runtime/client/client.js#L1569 is the culprit. I'm not sure resolving that would fix it for all your cases though - what would happen if someone starts at a different sveltekit.com/X
route and then does a client-side navigation to sveltekit.com/my-id
, it would still fail, right?
I assume it would fail, but there's no client-side navigation to/from sveltekit.com/my-id
, so haven't run into that. If that changes in the future, I'll need to think of a different solution
It's not ideal because it has some other effects (which may or may not affect you), but as a workaround you could try setting the embedded
option to true
(https://kit.svelte.dev/docs/configuration#embedded)
Nice, that workaround does the trick :)
The new reroute hook is a perfect alternative for my use case. Feel free to close this issue if there's no interest in fixing
Describe the bug
When proxying a domain to a SvelteKit website, the router now re-executes the router which causes a 404. Example:
I have the SvelteKit website
sveltekit.com
. Onproxy.com
, I have a proxy which is an alias forsveltekit.com
, except the root urlproxy.com/
proxies tosveltekit.com/my-id
.This issue started happening in 1.0.0-next.577.
Reproduction
https://github.com/probablykasper/sveltekit-proxy-404-bug
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
Use case: At https://limey.io users can build their own pages, and connect custom domains to those pages. To make this possible, we have a Cloudflare Worker which proxies the custom domains to their respective pages.