backend-defaults: add backend.health.headers config

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-12-05 09:35:34 +01:00
parent 45b5f3440f
commit fd5d337df4
8 changed files with 242 additions and 31 deletions
+17
View File
@@ -552,6 +552,23 @@ export interface Config {
*/
csp?: { [policyId: string]: string[] | false };
/**
* Options for the health check service and endpoint.
*/
health?: {
/**
* Additional headers to always include in the health check response.
*
* It can be a good idea to set a header that uniquely identifies your service
* in a multi-service environment. This ensures that the health check that is
* configured for your service is actually hitting your service and not another.
*
* For example, if using Envoy you can use the `service_name_matcher` configuration
* and set the `x-envoy-upstream-healthchecked-cluster` header to a matching value.
*/
headers?: { [name: string]: string };
};
/**
* Configuration related to URL reading, used for example for reading catalog info
* files, scaffolder templates, and techdocs content.