redirect is for use within cache/action, try extracting that async function into a cache and calling it in loadreturn redirect it doesn't do anything/server_ that thrown response would have to be serialized and sent in a wrapper response to get back to the client (I think Ryan demonstrated that that actually works).async by extension redirects won't work.(admin).tsx route group, see below. It logs null for the user object, but doesn’t redirect./ but that doesn't work with redirecting from /login to / if you're already logged inthrow and return, neither works/login needs to be in the Location header. Two paths:load tried to access the response header when it was already too late. redirecting (on the server side) outside of where the server's response can be touched or something else is modifying the Location header later?nativeEvent within the cache fn? Bit puzzled as to what’s happening here, I’ve tried to create a reproduction yesterday and it did in fact work as expected. So I thought maybe it had to do something with my local setup. Anyway, I’m just trying the Stackblitz example again now (not having changed anything) and the same issue is appearing https://stackblitz.com/edit/github-qbrg4x?file=src%2Froutes%2F(admin).tsx/manage-orders page.redirect, the navigation to that route will comply with the redirect as well.Where exactly would I check the value of that header?
manage-order link because of the getCurrentUser() you put in the route component's load function.Headers tab which lists the request and response headers.Location: / —that is the result of your redirect.As soon as you add a direct dependency in the route component to a cache point that just threw a redirect, the navigation to that route will comply with the redirect as well.