Merge pull request #802 from navi-infra/INFRA-2824-ratelimit-headername
INFRA-2824 | Harinder | Bug fix: Kong rate limit config was incorrect in case a user was doing rate limit on header
This commit is contained in:
@@ -1175,7 +1175,7 @@
|
||||
{
|
||||
"apiVersion": "configuration.konghq.com/v1",
|
||||
"config": {
|
||||
"header": "hello-world",
|
||||
"header_name": "hello-world",
|
||||
"limit_by": "header",
|
||||
"minute": 60
|
||||
},
|
||||
|
||||
@@ -163,7 +163,7 @@ local create_kong_rate_limiter(environment, servicePrefix, typeIdentifier, gatew
|
||||
minute: rule.limit,
|
||||
limit_by: '%s' % rule.options,
|
||||
[if rule.options == 'path' then 'path' else null]: '%s' % forTheGateway,
|
||||
[if rule.options == 'header' then 'header' else null]: '%s' % rule.header,
|
||||
[if rule.options == 'header' then 'header_name' else null]: '%s' % rule.header,
|
||||
},
|
||||
} for rule in rateLimitRules],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user