Rate Limiter Service#97
Conversation
I did that because when using Razor Pages and Home controller you have two defaults for the home page. Thanks for doing this, I'll check out the code. |
|
@maartenba @wtgodbe all the rate limiters stopped working. I'm testing with localhost and hitting refresh quickly. The timestamp changes but I never hit the limit. |
|
Haven't tested yet, but looks from that snippet a |
|
@maartenba @Rick-Anderson, I guess it should have both
Please take a look at the following configuration for the scenario I'm talking about Any reason behind the overload of |
|
First one is registered as options in the service container and lets you add multiple policies etc. |
|
@maartenba got it. thanks 😺 @Rick-Anderson it would be great if you can come up with a scenario where a rate limiter needs to be initialized immediately using |
This was the only way to add rate limiting & configure options in the original design. We kept it around after adding the |
|
So it comes down to this: you always need the |
Yep, you got it! |
Fixes #14
@Rick-Anderson please review. I found that naming HomeController as Home2Controller is a bit weird. I renamed it back to HomeController. Let me know if the name Home2 was intentional or not. The project was giving me some errors when I started working on it. I tried to fix the issues. Please run the app with different rate limiter configurations. If I miss any configuration. let me know. Thanks 😸