Browsers don’t expect a location header with a non 3xx response. I made a similar mistake. If the redirect is more important than the status code (which a user doesn’t see in a web app) then you will need to use a 3xx status code (like 302) or just remove the status code.