Skip to content

Commit

Permalink
Clean up unecessary Tee
Browse files Browse the repository at this point in the history
  • Loading branch information
optix2000 committed May 5, 2022
1 parent bf1a68b commit 92fa18e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ func (s *StriveAPIProxy) HandleCatchall(w http.ResponseWriter, r *http.Request)
w.Header()[name] = values
}
w.WriteHeader(resp.StatusCode)
reader := io.TeeReader(resp.Body, w) // For dumping API payloads
_, err = io.ReadAll(reader)
_, err = io.Copy(w, resp.Body)
if err != nil {
fmt.Println(err)
}
Expand Down

0 comments on commit 92fa18e

Please sign in to comment.