Skip to content

bug: limit count X-RateLimit-Reset is 0 #9964

Description

@DGolubets

Current Behavior

Using Limit Count plugin, when X-RateLimit-Remaining reaches 0, X-RateLimit-Reset starts to return 0.

Expected Behavior

X-RateLimit-Remaining should show remaining time to reset.

Error Logs

No response

Steps to Reproduce

  1. Enable the plugin (I did it for a consumer):
{
  "username": "test",
  "plugins": {
    "limit-count": {
      "count": 2,
      "key": "test-user",
      "key_type": "constant",
      "policy": "local",
      "rejected_code": 503,
      "time_window": 60
    }
  }
}
  1. Run requests via curl -v

Environment

APISIX install with Helm in k8s.
Chart version: apisix-2.1.0
App version: 3.4.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions