-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.toml
More file actions
92 lines (73 loc) · 1.93 KB
/
config.example.toml
File metadata and controls
92 lines (73 loc) · 1.93 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
# Axon API Gateway Configuration Example (TOML)
listen_addr = "0.0.0.0:8080"
[health_check]
enabled = true
path = "/health"
interval_secs = 30
timeout_secs = 5
[protocols]
http2_enabled = true
websocket_enabled = true
http3_enabled = false
http2_max_frame_size = 65536
http2_max_concurrent_streams = 100
[security.management]
# disabled | local_only | public
health_policy = "local_only"
metrics_enabled = false
status_enabled = false
[security.remote_config]
# Explicitly opt in if you must fetch config over http://
allow_insecure_http = false
[security.forwarded_headers]
# Unsafe compatibility mode for deployments that still rely on client-provided
# X-Forwarded-* headers.
trust_client_forwarded_headers = false
# [tls]
# cert_path = "/path/to/cert.pem"
# key_path = "/path/to/key.pem"
# protocols = ["TLSv1.2", "TLSv1.3"]
[routes."/api/v1/"]
type = "load_balance"
strategy = "round_robin"
targets = [
"http://backend1:3000",
"http://backend2:3000",
"http://backend3:3000",
]
[routes."/api/v1/".rate_limit]
requests_per_minute = 100
burst_size = 20
[routes."/api/v1/".request_headers.add]
"X-Gateway" = "axon"
"X-Forwarded-Proto" = "https"
[routes."/api/v1/".request_headers]
remove = ["Server"]
[routes."/api/v1/".response_headers.add]
"X-Response-Time" = "auto"
"Cache-Control" = "no-cache"
[routes."/auth/"]
type = "proxy"
target = "http://auth-service:4000"
path_rewrite = "/auth/(.*)"
[routes."/auth/".rate_limit]
requests_per_minute = 50
burst_size = 10
[routes."/static/"]
type = "static"
root = "/var/www/static"
[routes."/static/".rate_limit]
requests_per_minute = 200
burst_size = 50
[routes."/old-api/"]
type = "redirect"
target = "/api/v1/"
status_code = 301
[routes."/ws/"]
type = "proxy"
target = "ws://websocket-service:5000"
[backend_health_paths]
"http://backend1:3000" = "/health"
"http://backend2:3000" = "/health"
"http://backend3:3000" = "/health"
"http://auth-service:4000" = "/health/check"