Description
Problem
Currently, advanced-ratelimit's keyExtraction can only read from headers or properties present on the original request. This means a key set by an earlier policy in the chain
can't be used to selectively apply throttling — there's no way to say "only throttle traffic matching a specific value on a specific resource path," everything reaching a quota
gets bucketed and counted.
A common use case this blocks: applying a rate limit only for a specific client/application on a specific route, while leaving all other traffic on that route completely
unaffected.
Possible Solutions
Provide the option to define a key and a filter to reduce scope — for example, a regex to select which values a quota should apply to:
keyExtraction:
- type: header
key: x-app-id
filter: 'guest-*|channel-partner'
Description
Problem
Currently,
advanced-ratelimit'skeyExtractioncan only read from headers or properties present on the original request. This means a key set by an earlier policy in the chaincan't be used to selectively apply throttling — there's no way to say "only throttle traffic matching a specific value on a specific resource path," everything reaching a quota
gets bucketed and counted.
A common use case this blocks: applying a rate limit only for a specific client/application on a specific route, while leaving all other traffic on that route completely
unaffected.
Possible Solutions
Provide the option to define a key and a filter to reduce scope — for example, a regex to select which values a quota should apply to: