Rate limit based on header value

What is the name of the domain?

api.mydomain.com

What is the issue you’re encountering

Unable to use header value for rate limit

What steps have you taken to resolve the issue?

Went to Cloudflare dashboard and try to create a new rate limit rule for a given domain. There is no option to aggregate the requests by a given header value.

What we need is to allow X number of requests per 10s for a given API key which comes on the header x-api-key.

Needs an Enterprise plan with advanced rate limiting option if using the standard Cloudflare rate limiter…

Otherwise you can use a Worker…

This topic was automatically closed after 15 days. New replies are no longer allowed.