Skip to content

Apply rate limiting globally  #1915

@erick20

Description

@erick20

this is my configuration that is not working globally

"GlobalConfiguration": {
    "BaseUrl": "https://localhost:5002",
    "RateLimitOptions": {
      "DisableRateLimitHeaders": true,
      "QuotaExceededMessage": "Exceed ",
      "HttpStatusCode": 400,
      "ClientWhitelist": [],
      "EnableRateLimiting": true,
      "Period": "10s",
      "PeriodTimespan": 3,
      "Limit": 1
    }
  }

when i'm adding this to a specific route it is working

  "RateLimitOptions": {
      "ClientWhitelist": [],
      "EnableRateLimiting": true,
      "Period": "10s",
      "PeriodTimespan": 3,
      "Limit": 1
    }

is there any option to setup rate limiting globally that will affect to my all endpoints?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfigurationOcelot feature: ConfigurationRate LimitingOcelot feature: Rate LimitingSpring'25Spring 2025 releaseacceptedBug or feature would be accepted as a PR or is being worked onfeatureA new feature

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions