Skip to content

Commit

Permalink
Use HTTP 200 instead of 204 for healthcheck (#27)
Browse files Browse the repository at this point in the history
While testing the upgrade in two different cloud providers, I found that
both of them don't respect anything other than HTTP 200 as a successful
ping check.

To accomodate for the two providers, let's just use a HTTP 200 to save
people doing hacky TCP checks instead.
  • Loading branch information
jacobbednarz authored and eli committed Jul 18, 2018
1 parent a63adf6 commit 2503c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (dr *DumbRouter) SetHeaders(w http.ResponseWriter) {
// HealthCheckHandler is HTTP handler for confirming the backend service
// is available from an external client, such as a load balancer.
func (dr *DumbRouter) HealthCheckHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(204)
w.WriteHeader(200)
}

// ServeHTTP fulfills the http server interface
Expand Down

0 comments on commit 2503c9a

Please sign in to comment.