Comments (6)
Any progress on this?
from aspnetcoreratelimit.
Too bad, but I understand. Thanks for the effort 👍
I personally don't need to update this real-time for my solution, I would just favor something like this:
[HttpThrottle(["1m", "5m"], [2, 100])]
over a long list of appsettings policies. The HttpThrottle being the pseudo code here of course.
Anyway, great project and I think I'll manage without it haha.
Cheers!
from aspnetcoreratelimit.
Another way of implementing this is creating plain attributes, which do nothing. And use reflection to get all the endpoints configured this way. Then just pass it as the configuration class.
Yes, this is worse than implementing the code directly in an action filter attribute, yet it does the job as good as the current implementation, while not requiring too much effort. And if you configure it once per app life, we don't care about reflection being slow here.
I am most likely will be going with this approach for my scenario, can do a PR here if it works.
from aspnetcoreratelimit.
Any progress on this?
I second that. This feature would be much appreciated.
from aspnetcoreratelimit.
I tried to implement this some time ago (https://github.com/stefanprodan/AspNetCoreRateLimit/tree/feature/inline_attributes), but I couldn't easily make it work, it needed too much refactoring, maybe some breaking changes - so I abandoned it.
In the same time, I'm not sure of the actual value of this feature - having to re-deploy the code to change the limits doesn't sound so "maintainable".
from aspnetcoreratelimit.
In the same time, I'm not sure of the actual value of this feature - having to re-deploy the code to change the limits doesn't sound so "maintainable".
I think both types of configuration are very valid. I see how changing the configuration on the fly without redeploying could be valuable.
However, having all the endpoint configurations at the Controller level is much easier to read and maintain at the code level. Redeploying is very easy in a modern CI/CD scenario, unless you need to do it a lot, which is not always the case.
Would like very much to see this feature.
Looking at the code, I understand your concern about needing a major refactor. On the other hand, all the code is already there, the attribute is the same as the middleware, but with the rules passed to them directly and per endpoint.
from aspnetcoreratelimit.
Related Issues (20)
- How can I disable rate limiting for google bots?
- Incremental Rate limiting
- No fallback if Redis isn't available
- How to let Get and Post use different Quota exceeded response
- ClientRateLimitOptions reload HOT 2
- rate limiting is not working for with .net6 and AspNetCoreRateLimit 5.0 HOT 1
- Getting CORS error instead of 429 (when using AspNetCoreRateLimit Nuget)
- Does it support interface access control based on queues
- Per user rate limit with seeding of the current usages HOT 1
- Endpoint path involving * (variable) not working correctly HOT 3
- Is there a way to rate limit globally on an end-point HOT 1
- same ip with different device in lan HOT 1
- Using Azure redis
- Post or put rule not working
- How to load client rules on execution, not startup HOT 1
- Release new version
- RateLimiting Not Working HOT 1
- Get the real User's desktop IP vs proxy ip address
- On ip got blocked
- Is this still maintained?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnetcoreratelimit.