root: Make health checks compatible with cloud platform load balancers (#10554)
* Change health checks to return HTTP 200. * Fix web.go check. * Only update docs. * update docs and add changelog entry Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -89,7 +89,7 @@ func NewWebServer() *WebServer {
|
||||
}
|
||||
req.Header.Set("User-Agent", "goauthentik.io/router/healthcheck")
|
||||
res, err := ws.upstreamHttpClient().Do(req)
|
||||
if err == nil && res.StatusCode == 204 {
|
||||
if err == nil && res.StatusCode >= 200 && res.StatusCode < 300 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
Reference in New Issue
Block a user