-
Notifications
You must be signed in to change notification settings - Fork 43
/
tree-gateway-test.yml
155 lines (152 loc) · 4.3 KB
/
tree-gateway-test.yml
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
rootPath: './test/data/root'
database:
redis:
options:
db: 1
gateway:
protocol:
http:
listenPort: 8010
https:
listenPort: 8012
privateKey: './server.key'
certificate: './server.crt'
ciphers:
- "ECDHE-RSA-AES128-SHA256"
- "DHE-RSA-AES128-SHA256"
- "AES128-GCM-SHA256"
- "!RC4"
- "HIGH"
- "!MD5"
- "!aNULL"
honorCipherOrder: true
admin:
protocol:
http:
listenPort: 8011
accessLogger:
msg: 'HTTP {{req.method}} - {{res.statusCode}} - {{req.url}} ({{res.responseTime}}ms)'
console:
timestamp: true
colorize: true
file:
timestamp: true
json: false
prettyPrint: true
outputDir: ./logs
userService:
jwtSecret: secret
filter:
- name: ipFilter
options:
whitelist:
- "127.0.0.1"
- "::1"
statusCode: 403
message: IP Filtered
apiDocs:
path: api-docs
host: localhost:8011
logger:
level: info
console:
colorize: true
file:
timestamp: true
outputDir: ./logs
json: false
prettyPrint: true
accessLogger:
msg: 'HTTP {{req.method}} - {{res.statusCode}} - {{req.url}} ({{res.responseTime}}ms)'
console:
timestamp: true
colorize: true
file:
timestamp: true
json: false
prettyPrint: true
outputDir: ./logs
filter:
- name: ipFilter
options:
whitelist:
- "127.0.0.1"
- "::1"
statusCode: 403
message: IP Filtered
database:
checkInterval: 1 second
analytics:
enabled: true
serviceDiscovery:
provider:
name: consul
options:
host: localhost
port: 8500
defaults:
wait: 3 minutes
healthcheck: /healthcheck
config:
authentication:
my-basic-validator:
strategy:
id: basic
options:
verify:
name: verifyBasicUser
cache:
my-cache:
client:
cacheTime: 1 minute
cacheControl: public
mustRevalidate: false
noTransform: false
proxyRevalidate: false
server:
cacheTime: 10 minutes
binary: true
preserveHeaders: access-control-allow-credentials
circuitBreaker:
my-circuit-breaker:
timeout: 1
resetTimeout: 3 seconds
timeWindow: 2 seconds
maxFailures: 1
onOpen:
name: myOpenHandler
throttling:
my-rate-limit:
timeWindow: one minute
delay: 1 second
max: 1
keyGenerator:
name: myKeyGen
skip:
name: mySkip
handler:
name: myHandler
cors:
my-cors:
origin:
enableAll: true
filter:
my-ip-filter:
name: ipFilter
options:
blacklist:
- "127.0.0.1"
- "::1"
statusCode: 403
message: IP Filtered
interceptor:
request:
myRequestInterceptor:
id: myRequestInterceptor
response:
myResponseInterceptor:
id: myResponseInterceptor
errorHandler:
my-ErrorHandler:
name: errorHandler
options: {}