mirror of https://github.com/goproxyio/goproxy
Revert "[patch] allow caching it when http response code 302 is got from upstream"
This reverts commit 54104351f2
.
pull/157/head
v2.0.4
parent
54104351f2
commit
2c71c26191
|
@ -67,7 +67,7 @@ func NewRouter(srv *Server, opts *RouterOptions) *Router {
|
|||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
}
|
||||
rt.proxy.ModifyResponse = func(r *http.Response) error {
|
||||
if r.StatusCode == http.StatusOK || r.StatusCode == http.StatusFound {
|
||||
if r.StatusCode == http.StatusOK {
|
||||
var buf []byte
|
||||
if strings.Contains(r.Header.Get("Content-Encoding"), "gzip") {
|
||||
gr, err := gzip.NewReader(r.Body)
|
||||
|
|
Loading…
Reference in New Issue