fixed http status response for javascript redirects
This commit is contained in:
parent
fa3e25b86b
commit
19d3c0f8c6
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user