question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ClientRules does not overwrite GeneralRules

See original GitHub issue

Hi, i think client rules does not overwrite general rules. This is my configuration:

"ClientRateLimiting": {
    "EnableEndpointRateLimiting": false,
    "StackBlockedRequests": false,
    "ClientIdHeader": "X-ClientId",
    "HttpStatusCode": 429,
    "ClientRules": [
      {
        "ClientId": "cid123",
        "Rules": [
          {
            "Endpoint": "*",
            "Period": "1h",
            "Limit": 100
          }
        ]
      }
    ],
    "GeneralRules": [
      {
        "Endpoint": "*",
        "Period": "1s",
        "Limit": 2
      },
      {
        "Endpoint": "*",
        "Period": "1h",
        "Limit": 5
      }
    ]
  }

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
r4nc1dcommented, Jul 12, 2019

@roycornelissen, please find the gist https://gist.github.com/r4nc1d/f01e4594917843189299eed98f5043e2

For simplicity i just used RedisCache, that way I could just used the AbsoluteExpirationRelativeToNow, The key will get removed automatically once set time has expired.

0reactions
iesoftwaredevelopercommented, Jul 2, 2021

Try changing:

"ClientRateLimiting": {
    "EnableEndpointRateLimiting": false,

to

"ClientRateLimiting": {
    "EnableEndpointRateLimiting": true,
Read more comments on GitHub >

github_iconTop Results From Across the Web

ClientRateLimitMiddleware
Override general rules for specific clients appsettings.json: ... defined period that is not present in the Client rules then this general rule is...
Read more >
Symantec Endpoint Protection Installation and ...
Searching for the clients that do not have the client software installed. ... Preventing and allowing users to change the client's user interface....
Read more >
A Professional ASP.NET Core API - Rate Limit
We need to override the virtual OnActionExecuting method from our inherited class. Within this method we are doing the following: Obtaining the ...
Read more >
Configure API throttling settings
Throttling limits are applied to overall API usage by any single caller, client, organization, or endpoint. If an API call has reached its...
Read more >
AspNetCoreRateLimit Does not use query parameters ...
I'm using AspNetCoreRateLimit library with Asp.Net Core 2.2 web api. I've taken IpRateLimiting into use with it's default settings in Startup.cs ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found