Skip to content

"DisableRateLimitHeaders": false is not showing X-Rate-Limit and Retry-After headers in response #1305

@neetra

Description

@neetra

Expected Behavior / New Feature

configuration file:

{
"Routes" :  [  {
      "DownstreamPathTemplate": "/users",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "jsonplaceholder.typicode.com",
          "Port": 443
        }
      ],
      "UpstreamPathTemplate": "/users",
      "UpstreamHttpMethod": [ "Get" ],
      "RateLimitOptions": 
        {
          "ClientWhitelist": [],
          "EnableRateLimiting": true,
          "Period": "10s",
          "PeriodTimespan": 3,
          "Limit": 1
        }
      


    }],

  "GlobalConfiguration": {
   
    "RateLimitOptions": {
      "DisableRateLimitHeaders": true,
      "QuotaExceededMessage": "Exceed ",
      "HttpStatusCode": 602
    }

}

Response headers should contain X-Rate-Limit and Retry-After headers as mentioned in [document](https://ocelot.readthedocs.io/en/latest/features/ratelimiting.html)

Actual Behavior / Motivation for New Feature

image
It does not contain response headers.

Specifications

  • Version:

Metadata

Metadata

Assignees

Labels

Nov'24November 2024 releaseRate LimitingOcelot feature: Rate LimitingbugIdentified as a potential bugmergedIssue has been merged to dev and is waiting for the next release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions