fix middleware errors (#717)

pull/721/head
Tony Chen 4 years ago committed by GitHub
parent ef996c826a
commit 1fd1332c92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      transport/http/server.go

@ -144,7 +144,9 @@ func (s *Server) ServeHTTP(res http.ResponseWriter, req *http.Request) {
if s.middleware != nil { if s.middleware != nil {
h = s.middleware(h) h = s.middleware(h)
} }
h(ctx, req.WithContext(ctx)) if _, err := h(ctx, req.WithContext(ctx)); err != nil {
s.errorEncoder(res, req, err)
}
} }
// Endpoint return a real address to registry endpoint. // Endpoint return a real address to registry endpoint.

Loading…
Cancel
Save