Skip to content

Commit 4c63b85

Browse files
feat: update ocelot configuration to include global settings and rate limiting options
1 parent 2b5577c commit 4c63b85

1 file changed

Lines changed: 26 additions & 13 deletions

File tree

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
{
2-
"Routes": [
3-
{
4-
"UpstreamPathTemplate": "/api/v1/identity/authenticate",
5-
"UpstreamHttpMethod": [ "POST" ],
6-
7-
"DownstreamPathTemplate": "/api/v1/identity/authenticate",
8-
"DownstreamScheme": "http",
9-
"DownstreamHostAndPorts": [
2+
"GlobalConfiguration": {
3+
"DownstreamScheme": "{GlobalConfiguration__DownstreamScheme}",
4+
"DownstreamHostAndPorts": [
5+
{
6+
"Host": "{GlobalConfiguration__DownstreamHostAndPorts__0__Host}",
7+
"Port": 5286
8+
}
9+
]
10+
},
11+
"Routes": [
1012
{
11-
"Host": "{DOWNSTREAM_HOST}",
12-
"Port": 443
13+
"UpstreamPathTemplate": "/api/v1/identity/authenticate",
14+
"DownstreamPathTemplate": "/api/v1/identity/authenticate",
15+
"UpstreamHttpMethod": [
16+
"POST"
17+
],
18+
"RateLimitOptions": {
19+
"EnableRateLimiting": true,
20+
"Period": "1s",
21+
"Limit": 5
22+
},
23+
"QoSOptions": {
24+
"ExceptionsAllowedBeforeBreaking": 3,
25+
"DurationOfBreak": 5000,
26+
"TimeoutValue": 2000
27+
}
1328
}
14-
]
15-
}
16-
]
29+
]
1730
}

0 commit comments

Comments
 (0)