Skip to content

Commit

Permalink
make http healthcheck always return 200 regardless path
Browse files Browse the repository at this point in the history
  • Loading branch information
povsister committed Sep 9, 2024
1 parent 6733d85 commit 17e76d4
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions proxy/httphealthcheck/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,6 @@ func (s *HealthServer) Process(ctx context.Context, net net.Network, conn intern
}

func (s *HealthServer) handleHttp(ctx context.Context, request *http.Request, writer io.Writer, dispatcher routing.Dispatcher) error {
if request.URL.Path != "/health" {
response := &http.Response{
Status: "Not Found",
StatusCode: 404,
Proto: "HTTP/1.1",
ProtoMajor: 1,
ProtoMinor: 1,
Header: http.Header(make(map[string][]string)),
Body: nil,
ContentLength: 0,
Close: true,
}
response.Header.Set("Connection", "close")
return response.Write(writer)
}
response := &http.Response{
Status: "OK",
StatusCode: 200,
Expand Down

0 comments on commit 17e76d4

Please sign in to comment.