TanStackT
TanStack6mo ago
9 replies
conventional-black

Changing base path does not seem to work for ingress

Hi
I've been tearing my hair out for a while on this issue. We basically have multiple apps on a single domain: customer.company.com/app-a, customer.company.com/app-b, customer.company.com/app-c. We use ingress to manage routing when users visit specific domain/folder combinations.

However, there seems to be an issue where I can't figure out how to tell TanStack Start to understand this setup:

1. Setting router basepath to /app-a means that when you visit customer.company.com/app-a, Start runs into an infinite redirect loop, unless you go to customer.company.com/app-a/app-a - then it loads the page but not the assets, since the assets request customer.company.com/app-a/assets when they should be requesting customer.company.com/app-a/app-a/assets.
2. Setting both router basepath and Vite
base
has similar outcomes.
3. Setting only Vite
base
causes it to append app-a to URLs instead of realizing we're already in that folder.

I've tried all kinds of combinations at this point, and it's a shame because I love TanStack Start and want to use it wherever we need it. But this has been such a problem that we have to create separate domains like app-a.customer.company.com to work around it.

If anyone has any ideas on what I can do differently or some magic solution, please share. Thank you!
Was this page helpful?