Class Headers
Message headers can be manipulated when Envoy forwards requests to, or responses from, a destination service. Header manipulation rules can be specified for a specific route destination or for all destinations. The following V1VirtualService adds a test header with the value true to requests that are routed to any reviews service destination. It also removes the foo response header, but only from responses coming from the v1 subset (version) of the reviews service.
Namespace: Neon.Kube.Resources.Istio
Assembly: Neon.Kube.Resources.dll
Syntax
public class Headers
Constructors
Headers()
Initializes a new instance of the Headers class.
Declaration
public Headers()
Properties
Request
Header manipulation rules to apply before forwarding a request to the destination service
Declaration
[JsonProperty(PropertyName = "request", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public HeaderOperations Request { get; set; }
Property Value
| Type | Description |
|---|---|
| HeaderOperations |
Response
Header manipulation rules to apply before returning a response to the caller
Declaration
[JsonProperty(PropertyName = "response", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public HeaderOperations Response { get; set; }
Property Value
| Type | Description |
|---|---|
| HeaderOperations |
Methods
Validate()
Validate the object.
Declaration
public virtual void Validate()
Exceptions
| Type | Condition |
|---|---|
| ValidationException | Thrown if validation fails. |