Use Case: I need to send a request to the server (cluster) after matching two headers with "AND" logic.
Is this possible in Envoy? if yes please help with syntax or solution-
my envoy configmap looks like-
kind: ConfigMap
metadata:
name: test-envoy-conf
data:
envoy.yaml: |
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 443
traffic_direction: OUTBOUND
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: AUTO
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: https
domains:
- "*"
routes:
- match:
prefix: "/"
headers:
- name: x-envoy-original-dst-host
string_match:
suffix: ": 10004"
- name: app
exact_match: "ms-example-server"
and_match: true
route:
cluster: destination_cluster
http_filters:
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
transport_socket:
name: envoy.transport_sockets.tls
typed_config:
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext
common_tls_context:
tls_certificates:
- certificate_chain:
filename: "/etc/ssl/envoy/tls.crt"
private_key:
filename: "/etc/ssl/envoy/tls.key"
# Setup the Original Destination cluster
clusters:
- name: destination_cluster
.....
Is it possible to match headers based on AND logic and send to the desired cluster in an envoy?