diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 91b4eb714..2783b1ac3 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -7,6 +7,10 @@ COPY . . RUN go build -o /work/proxy . # Copy binary to alpine -FROM gcr.io/distroless/base-debian10 +FROM gcr.io/distroless/base-debian10:debug + COPY --from=builder /work/proxy / + +HEALTHCHECK CMD [ "wget", "spider", "http://localhost:4180/pbprox/ping" ] + ENTRYPOINT ["/proxy"] diff --git a/proxy/pkg/server/api.go b/proxy/pkg/server/api.go index fd8251f76..becae3db5 100644 --- a/proxy/pkg/server/api.go +++ b/proxy/pkg/server/api.go @@ -47,7 +47,6 @@ func getCommonOptions() *options.Options { commonOpts.EmailDomains = []string{"*"} commonOpts.ProviderType = "oidc" commonOpts.ProxyPrefix = "/pbprox" - commonOpts.PingPath = "/pbprox/ping" commonOpts.SkipProviderButton = true commonOpts.Logging.SilencePing = true commonOpts.SetXAuthRequest = true diff --git a/proxy/pkg/server/server.go b/proxy/pkg/server/server.go index 9d71dbda3..8f22c34aa 100644 --- a/proxy/pkg/server/server.go +++ b/proxy/pkg/server/server.go @@ -82,6 +82,10 @@ func (s *Server) ServeHTTPS() { } func (s *Server) handler(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == "/pbprox/ping" { + w.WriteHeader(204) + return + } handler, ok := s.Handlers[r.Host] if !ok { // If we only have one handler, host name switching doesn't matter