Skip to content

Commit

Permalink
PMM-12776 Update go version for API tests (#2978)
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk authored Apr 30, 2024
1 parent 958a5a9 commit dc10c50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Dockerfile is used only for API tests.

FROM golang:1.21
FROM golang:1.22

RUN export GOPATH=$(go env GOPATH) && \
mkdir -p $GOPATH/src/github.com/percona/pmm
Expand Down
4 changes: 2 additions & 2 deletions vmproxy/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ func getHandler(cfg Config) http.HandlerFunc {
Director: director(cfg.TargetURL, cfg.HeaderName),
}

return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
return func(rw http.ResponseWriter, req *http.Request) {
logrus.Infof("%s: %s", req.Method, req.URL)

if failOnInvalidHeader(rw, req, cfg.HeaderName) {
return
}

rProxy.ServeHTTP(rw, req)
})
}
}

func failOnInvalidHeader(rw http.ResponseWriter, req *http.Request, headerName string) bool {
Expand Down

0 comments on commit dc10c50

Please sign in to comment.