Enable redirects that happen in a request context

Not 100% sure this is the right spot for this but it works for me. It would be better if we could have a way to pass the status code of the redirect (301 or 302) but based on the source (window.location.path change) this might not make sense.