Git Product home page Git Product logo

Comments (7)

ledouxpl avatar ledouxpl commented on May 1, 2024 1

from aspnetcoreratelimit.

stefanprodan avatar stefanprodan commented on May 1, 2024

Hello,

As a workaround, until I find some time to implement regex you can whitelist "get:/api/values/Search" and rate limit "get:/api/values/".

from aspnetcoreratelimit.

ledouxpl avatar ledouxpl commented on May 1, 2024

I believe Controller and ActionMethods attributes are a must. This way, you have right in your controller the endpoint specific rules. This prevent mistakes when an api route is modified but the limit configuration is not updated to reflect the changes.

In my opinion, those attributes should be heavily inspired by the ASP.Net Core ResponseCache attributes.

The attributes should also support a way of applying the limit per action-method, per route (taking into account the route parameters), and even maybe by url (taking into account the query parameters).

from aspnetcoreratelimit.

stefanprodan avatar stefanprodan commented on May 1, 2024

Would you hardcode IPs and client API keys in those attributes?

from aspnetcoreratelimit.

binn avatar binn commented on May 1, 2024

Have IPs, and client API keys loaded from a configuration like before, attribute-based rules as an option, or just like before, load ratelimit rules from a file.

from aspnetcoreratelimit.

zuckerthoben avatar zuckerthoben commented on May 1, 2024

Like @ledouxpl I rely a lot on route parameters. I am currently implementing the middleware but just came across an issue, where I have to rate limit an endpoint that uses a route parameter. Not having the option of wildcards in endpoint paths is a blocking restriction.

from aspnetcoreratelimit.

cristipufu avatar cristipufu commented on May 1, 2024

check this out #63

from aspnetcoreratelimit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.