Skip to content

Commit

Permalink
Revert "[patch] allow caching it when http response code 302 is got f…
Browse files Browse the repository at this point in the history
…rom upstream"

This reverts commit 5410435.
  • Loading branch information
oiooj committed Aug 31, 2020
1 parent 5410435 commit 2c71c26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2c71c26

Please sign in to comment.