Open mohi41 opened 3 years ago
@melmi I think you would need to create your own custom config class (inheriting from RateLimitConfiguration) and register it in your services. Also your own IClientResolveContributor implementation in order to resolve the client ID.
This might be a useful resource in that case, assuming for example you are using OAuth client credentials flow, you can extract the tenant from the user claims:
https://blog.elmah.io/rate-limiting-api-requests-with-asp-net-core-and-aspnetcoreratelimit/
Hi I have a multi-tenant service and I want to enforce different rules (and quotas) based on the [tenantId + ClientId]. Each tenant should have its own rules. Any suggestion?