how to redirect in a "use server" function?
is there a way to redirect outside of cache, action and without useNavigate?
1 Reply
Try to return new Response with a location header
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location
MDN Web Docs
Location - HTTP | MDN
The Location response header indicates the URL to
redirect a page to. It only provides a meaning when served with a
3xx (redirection) or 201 (created) status response.