forked from envoyproxy/ratelimit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxy.yaml
More file actions
104 lines (104 loc) · 3.65 KB
/
proxy.yaml
File metadata and controls
104 lines (104 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8001
static_resources:
clusters:
- name: ratelimit
type: STRICT_DNS
connect_timeout: 1s
lb_policy: ROUND_ROBIN
protocol_selection: USE_CONFIGURED_PROTOCOL
http2_protocol_options: {}
load_assignment:
cluster_name: ratelimit
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: ratelimit
port_value: 8081
- name: mock
connect_timeout: 1s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: mock
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: envoy-mock
port_value: 9999
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 8888
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
codec_type: auto
stat_prefix: ingress
http_filters:
- name: envoy.rate_limit
config:
domain: rl
request_type: external
stage: 0
rate_limited_as_resource_exhausted: true
failure_mode_deny: false
rate_limit_service:
grpc_service:
envoy_grpc:
cluster_name: ratelimit
- name: envoy.router
config: {}
route_config:
name: route
virtual_hosts:
- name: backend
domains:
- "*"
routes:
- match:
prefix: /test
route:
cluster: mock
rate_limits:
- actions:
- source_cluster: {}
- destination_cluster: {}
- match:
prefix: /header
route:
cluster: mock
rate_limits:
- actions:
- request_headers:
header_name: "foo"
descriptor_key: "foo"
- match:
prefix: /twoheader
route:
cluster: mock
rate_limits:
- actions:
- request_headers:
header_name: "foo"
descriptor_key: "foo"
- request_headers:
header_name: "bar"
descriptor_key: "bar"
- actions:
- request_headers:
header_name: "foo"
descriptor_key: "foo"
- request_headers:
header_name: "baz"
descriptor_key: "baz"