Skip to content

Commit 8b85b4a

Browse files
authoredMar 6, 2024··
fix: remove unnecessary "http.Handler" #221 (#222)
1 parent b1777ae commit 8b85b4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎proxy/proxy.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func (p *Proxy) buildEndpoint(e *config.Endpoint, ms []*config.Middleware) (_ ht
248248
retryBreaker.MarkFailed()
249249
}
250250
}
251-
return http.Handler(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
251+
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
252252
startTime := time.Now()
253253
setXFFHeader(req)
254254

@@ -342,7 +342,7 @@ func (p *Proxy) buildEndpoint(e *config.Endpoint, ms []*config.Middleware) (_ ht
342342
}
343343
doCopyBody()
344344
requestsTotalIncr(labels, resp.StatusCode)
345-
})), closer, nil
345+
}), closer, nil
346346
}
347347

348348
func getReplyMD(ep *config.Endpoint, resp *http.Response) selector.ReplyMD {

0 commit comments

Comments
 (0)
Please sign in to comment.