Skip to content

Commit

Permalink
feat: Use context in proxy middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
dadav committed Mar 3, 2024
1 parent ee4aa27 commit 0b39fa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/middleware/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func forwardRequest(w http.ResponseWriter, r *http.Request, forwardHost string)
return
}

forwardedRequest, err := http.NewRequest(r.Method, forwardUrl, bytes.NewBuffer(requestBodyBytes))
forwardedRequest, err := http.NewRequestWithContext(r.Context(), r.Method, forwardUrl, bytes.NewBuffer(requestBodyBytes))
if err != nil {
http.Error(w, "Failed to create forwarded request", http.StatusInternalServerError)
return
Expand Down

0 comments on commit 0b39fa0

Please sign in to comment.