Skip to content

Commit

Permalink
Document X-Use-Status-Code-From-Response HTTP header
Browse files Browse the repository at this point in the history
  • Loading branch information
bart-vmware committed Dec 20, 2024
1 parent 890858f commit 989c55f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/v4/management/health.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ builder.Services.AddHealthActuator();
> It's recommended to use `AddAllActuators()` instead of adding individual actuators,
> which enables individually turning them on/off at runtime via configuration.
By default, the health status is reflected in the HTTP response status code.
For example, when a health check fails, the response status code is `503 Service Unavailable`.
The configuration key `Management:Endpoints:UseStatusCodeFromResponse` can be set to `false`, which makes the health response status code always be `200 OK`.
Clients can overrule this per request by sending an `X-Use-Status-Code-From-Response` HTTP header with the value `true` or `false`.

> [!TIP]
> By default, health contributors for disk space, liveness, and readiness are activated. They can be turned off through configuration:
> ```json
Expand Down

0 comments on commit 989c55f

Please sign in to comment.