TanStackT
TanStack11mo ago
24 replies
uncertain-scarlet

recommended way to redirect from api route?

i don't see any obvious way to do this. best thing i've come up with thus far without causing a 503 and/or just not executing the redirect is
    return new Response(null, {
      status: 302,
      headers: {
        Location: "/",
      },
    });


is there any way to do this from within the start api itself?
Was this page helpful?