Skip to content

Commit

Permalink
Reverse copying response HTTP headers
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Jul 15, 2024
1 parent f4124c5 commit 10414c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ func reverseProxy(targetURL string, w http.ResponseWriter, r *http.Request) {
w.WriteHeader(resp.StatusCode)

// Copy headers from the backend response
for k, v := range resp.Header {
w.Header()[k] = v
}
// for k, v := range resp.Header {
// w.Header()[k] = v
// }
// create gzip reader if response is in gzip data-format
body := resp.Body
defer resp.Body.Close()
Expand Down

0 comments on commit 10414c0

Please sign in to comment.