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 LimitingSummer'25Summer 2025 releasefeatureA new featuremergedIssue has been merged to dev and is waiting for the next release

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions