Rate Limiting Based on Custom Header


We already have custom headers we send with each API request to describe the customer using the API. Is there a way to rate limit using this value in the header?

For example X-Client-ID



1 Like

Unofficial hacky way that could work (and at some release break), a custom plugin with (in access):

ngx.ctx.authenticated_credential = { id = ngx.var.http_x_client_id }

We have this exact use case when deploying kong as a kubernetes ingress controller. We want to apply different rate limits based on the value of the custom header in the api request.

Were there any enhancements done since this thread was posted on this regards?

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ