Replies: 2 comments 1 reply
-
I have the same requirement, currently using a CF worker proxy to rewrite URLs is very uncomfortable, and I will encounter some stream interruption related issues |
Beta Was this translation helpful? Give feedback.
0 replies
-
I imagine we can already rewrite from middleware on server requests.. But if I understand this correctly we need to do so on client routing as well. So this is a router feature isn't it? Like a way of intercepting the path before sending it to matching? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice to have a feature similar to NextResponse.rewrite() in Next.js, allowing domain-based routing and proxying. This would enable different route structures for specific domains/tenants without the need for multiple apps or deployments.
An example of this is the Vercel Platforms Starter Kit (middleware.ts) which has 2 sets of routes:
app/app
for the root domain (app.vercel.pub)app/[domain]
for all other tenants (subdomains and custom domains)SvelteKit also has a
reroute
(sveltejs/kit#11537) hook that probably makes this possible, but I couldn't find an example since it was just recently released in January.Here are other proposals/RFCs from other frameworks that I've found:
Astro: withastro/roadmap#665, withastro/roadmap#681
Remix: remix-run/remix#2857, remix-run/remix#2886
Would the team be interested in exploring this feature?
Are there potential approaches or existing patterns that can be used as a workaround? (besides using an external/third-party proxy or multiple deployments)
Update: already possible - see https://egoist.dev/multi-tenant-web-app-2024#solid-start
Beta Was this translation helpful? Give feedback.
All reactions