Skip to content

Commit

Permalink
fixed http status response for javascript redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
kgretzky committed Jul 26, 2023
1 parent fa3e25b commit 19d3c0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/http_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ func (p *HttpProxy) blockRequest(req *http.Request) (*http.Request, *http.Respon

func (p *HttpProxy) javascriptRedirect(req *http.Request, rurl string) (*http.Request, *http.Response) {
body := fmt.Sprintf("<html><head><meta name='referrer' content='no-referrer'><script>top.location.href='%s';</script></head><body></body></html>", rurl)
resp := goproxy.NewResponse(req, "text/html", http.StatusFound, body)
resp := goproxy.NewResponse(req, "text/html", http.StatusOK, body)
if resp != nil {
return req, resp
}
Expand Down

0 comments on commit 19d3c0f

Please sign in to comment.