forked from praxis-proxy/praxis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunconditional-branch.yaml
More file actions
55 lines (49 loc) · 1.45 KB
/
Copy pathunconditional-branch.yaml
File metadata and controls
55 lines (49 loc) · 1.45 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
# Unconditional Branch (rejoin: next)
#
# Always runs a utility chain before continuing the main
# pipeline. Useful for injecting audit headers, logging
# metadata, or applying transformations that must run on
# every request regardless of filter results.
listeners:
- name: web
address: "127.0.0.1:8080"
filter_chains: [main]
filter_chains:
# Standalone audit chain: defined at top level for
# reuse across listeners or branches
- name: audit
filters:
- filter: headers
request_add:
- name: X-Audit
value: "applied"
- name: main
filters:
# Stamp each request for tracing
- filter: request_id
# Entry point: triggers the audit side-chain
- filter: headers
request_add:
- name: X-Pipeline
value: "main"
branch_chains:
# No on_result: fires on every request
- name: always_audit
# Rejoin at next filter; audit is a
# side-effect, not a routing decision
rejoin: next
chains:
# Reference by name: keeps the main
# chain focused on its own concerns
- audit
# Normal flow continues after audit
- filter: router
name: routing
routes:
- path_prefix: "/"
cluster: backend
- filter: load_balancer
clusters:
- name: backend
endpoints:
- "127.0.0.1:3000"