Skip to content

Commit

Permalink
Copy response headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
udhos committed May 20, 2023
1 parent a0e0d29 commit 42537ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/forward/forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ func forward(c *gin.Context, app *application) {
return
}

for k, v := range resp.Header {
for _, vv := range v {
c.Writer.Header().Add(k, vv)
}
}

contentType := resp.Header.Get("content-type")

c.Data(resp.StatusCode, contentType, full)
Expand Down

0 comments on commit 42537ae

Please sign in to comment.