Skip to content

feat: add rate-limiting-info variable#13155

Merged
Baoyuantop merged 3 commits into
apache:masterfrom
shreemaan-abhishek:backport-pr5-rate-limiting-info
Apr 9, 2026
Merged

feat: add rate-limiting-info variable#13155
Baoyuantop merged 3 commits into
apache:masterfrom
shreemaan-abhishek:backport-pr5-rate-limiting-info

Conversation

@shreemaan-abhishek

@shreemaan-abhishek shreemaan-abhishek commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new rate_limiting_info nginx variable exposing rate limit state as JSON
  • Variable contains: rate_limiting_key, rate_limiting_limit, rate_limiting_remaining, rate_limiting_reset
  • Accessible in log formats and conditional logic via $rate_limiting_info

Test plan

  • Route with limit-count plugin using key_type: var and key: http_host
  • Access log contains JSON with correct rate limiting key, limit, remaining, and reset values
  • All existing limit-count tests continue to pass

Backport from EE commit 8a7dc14. Adds a $rate_limiting_info nginx
variable that exposes rate limit state (key, limit, remaining, reset)
as JSON for use in access logs and conditional logic.

Only includes core files and limit-count plugin changes (excludes
limit-count-advanced which doesn't exist in OSS).
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Apr 3, 2026
Baoyuantop
Baoyuantop previously approved these changes Apr 8, 2026
Signed-off-by: Abhishek Choudhary <[email protected]>
@Baoyuantop
Baoyuantop merged commit 283963c into apache:master Apr 9, 2026
22 of 23 checks passed
wistefan pushed a commit to wistefan/apisix that referenced this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants