Reputation: 105
I want to apply rate limiting by header.
if X-yunus-api-key == fasdasd231jnde32e32e , apply rate limit.
Does Kong has this feature ?
--header 'Cache-Control: no-cache' \
--header 'X-yunus-api-key: fasdasd231jnde32e32e' \
--header 'Content-Type: application/json' \
--data-raw '{ }'
Upvotes: 1
Views: 1189
Reputation: 755
I want to apply rate limiting by header.
if X-yunus-api-key == fasdasd231jnde32e32e , apply rate limit.
Setting config.limit_by
to header
and specify config.header_name
to X-yunus-api-key
in rate-limiting plugin should be enough for your use case.
If you also want to validate the consumer. Using the key-auth plugin and setting credentials for consumers is another valid option
Upvotes: 2