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.

How to make a blacklist of Endpoints?

See original GitHub issue

I recently started using this package, but I don’t know and can’t find how to make a blacklist for endpoints? I tried doing this:

"IpRateLimiting": {
  "EnableEndpointRateLimiting": true,
  "StackBlockedRequests": true,
  "RealIpHeader": "X-Real-IP",
  "ClientIdHeader": "X-ClientId",
  "HttpStatusCode": 429,
  "IpWhitelist": [],
  "EndpointWhitelist": [],
  "ClientWhitelist": [],
  "GeneralRules": [
    {
      // These Endpoints doesn't work
      "Endpoint": [
        "get:/api/user/SearchByEmailOrPhone/*",
        "post:/api/auth/*",
        "get:/api/user/SetNewsletterSubscription/*"
      ],
      "Period": "15s",
      "Limit": 3
    },
    {
      "Endpoint": [
        "get:/api/user/SearchByEmailOrPhone/*",
        "post:/api/auth/*",
        "get:/api/user/SetNewsletterSubscription/*"
      ],
      "Period": "1m",
      "Limit": 6
    },
    {
      "Endpoint": [
        "get:/api/user/SearchByEmailOrPhone/*",
        "post:/api/auth/*",
        "get:/api/user/SetNewsletterSubscription/*"
      ],
      "Period": "5m",
      "Limit": 13
    }
  ]
}

but apparently, the Endpoint under GeneralRules, doesn’t accept an array of endpoints, it’ll be so cumbersome if I add all of my endpoints separately AND each of them with 3 limitation rules, so currently I have 3 endpoints which I want to add to the blacklist, 3 endpoints each with 3 rules will be 9 of these rule blocks (and it will probably get more than that), is there a better way to do this?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
bzmindcommented, Aug 27, 2022

👀

1reaction
taylorchasewhitecommented, Aug 22, 2022

I had to read through the code to figure it out 🥴

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make a blacklist of endpoints in ...
I recently started using the AspNetCoreRateLimit nuget package, but I don't know and can't find how to make a blacklist for endpoints?
Read more >
How to create and manage your blacklist API | SMSAPI Blog
Firstly, to use our Blacklist API, you must obtain an access token. You can quickly get it in SMSAPI Customer Portal.
Read more >
Creating Blacklist Overrides
Log in to your Endpoint Protection console. · Click the Overrides tab. · Click the Blacklist tab. · Click the Create button. ·...
Read more >
How to blacklist a network on your endpoint - SIM for Things
View/Create/Modify/Delete endpoint Network blacklisting via the Endpoint diagnosis – view network coverage page. · Via the new endPointBlacklisting API, you can ...
Read more >
SentinelOne Tutorial Exclusions and Blacklist + Interoperabilities
Welcome to this weeks episode of Techie Tuesdays, if you enjoyed watching make sure to like and subscribe! To get in contact with...
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