Is there a way to have Rewrites or Proxy?
Posted this on Github discussions too, but not sure if that's still active. Sorry for the spam!
This might be a dumb question, but I couldn't find any docs for it, so I might as well ask.
My team is moving away from Nextjs (pages) and moving to TSR (tanstack router with start/vinxi).
One of the difficulties we're seeing is that we couldn't find any docs on rewrites/proxies.
The reason this is a blocker for us is that we need to have the API set cookies from the same domain as the UI (due to multiple envs, legacy auth issue and others).
FWIW, i tried the vite server proxy, but it seems that tanstack router intercepts the request before vite proxy can (assumption).
In our
nextjs.config.ts
we have the following:
Here's a sample of what we're currently doing.
Hopefully there's a better way that this:
0 Replies