HealthEndpointOptions class
Options controlling the built-in health endpoint exposed by KestrunHost.
public sealed class HealthEndpointOptions
Public Members
| name | description |
|---|---|
| HealthEndpointOptions() | The default constructor. |
| AllowAnonymous { get; set; } | Gets or sets a value indicating whether anonymous callers can hit the endpoint. |
| AutoRegisterEndpoint { get; set; } | Gets or sets a value indicating whether the endpoint should be automatically registered when a host is created. |
| Compress { get; set; } | Gets or sets a value indicating whether the health response should be compressed/compact when using JSON or XML. When false (default) the output is human readable (indented / pretty). When true the output is compact (no unnecessary whitespace) which can reduce payload size for large probe data sets. |
| CorsPolicyName { get; set; } | Gets or sets the name of a CORS policy to apply, if any. |
| DefaultScriptLanguage { get; set; } | Gets or sets the script language used when generating health check probes from script. Defaults to PowerShell. |
| DefaultTags { get; set; } | Gets or sets the default probe tags applied when a request does not provide an explicit tag filter. |
| MaxDegreeOfParallelism { get; set; } | Gets or sets the maximum degree of parallelism used when executing probes. |
| OpenApiDescription { get; set; } | Gets or sets the OpenAPI description applied to the endpoint metadata. |
| OpenApiGroupName { get; set; } | Gets or sets the OpenAPI group name applied to the endpoint metadata. |
| OpenApiOperationId { get; set; } | Gets or sets the OpenAPI operation id applied to the endpoint metadata. |
| OpenApiSummary { get; set; } | Gets or sets the OpenAPI summary applied to the endpoint metadata. |
| OpenApiTags { get; set; } | Gets or sets the OpenAPI tag list applied to the endpoint metadata. |
| Pattern { get; set; } | Gets or sets the relative route path the endpoint is exposed on. Defaults to /health. |
| ProbeTimeout { get; set; } | Gets or sets the timeout applied to each individual probe execution. |
| RateLimitPolicyName { get; set; } | Gets or sets the name of an ASP.NET Core rate limiting policy to apply, if any. |
| RequirePolicies { get; set; } | Gets or sets additional authorization policies required for the endpoint. |
| RequireSchemes { get; set; } | Gets or sets additional authentication schemes required for the endpoint. Leave empty to inherit the application’s defaults. |
| ResponseContentType { get; set; } | Gets or sets the response content type produced by the endpoint. |
| ShortCircuit { get; set; } | Gets or sets a value indicating whether the endpoint should short-circuit the rest of the pipeline. |
| ShortCircuitStatusCode { get; set; } | Gets or sets the status code returned when ShortCircuit is true. Defaults to 200 or 503 depending on probe state. |
| ThrowOnDuplicate { get; set; } | Gets or sets a value indicating whether an exception should be thrown if an endpoint with the same pattern already exists. |
| TreatDegradedAsUnhealthy { get; set; } | Gets or sets a value indicating whether degraded probes should cause the endpoint to return 503 ServiceUnavailable. |
| XmlRootElementName { get; set; } | Gets or sets the root element name used when emitting XML output. Defaults to Response. Ignored for non-XML output types. If null or whitespace a default of Response is used. |
| Clone() | Creates a deep copy of the current instance. |
See Also
- namespace Kestrun.Health