Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add regex option to the settings. #135

Merged
merged 7 commits into from
Jul 31, 2020
Merged

Conversation

aquaosrs
Copy link

The Problem:

I couldn't rate limit all items with the urls

get:/api/category/type/{id}

without also capturing the traffic for

get:/api/category/type/template

The Solution:

Allow an option for Regex filtering.

Notes:

I have cloned the wiki from this repo to here and made some appropriate changes

https://github.com/AprilHickson/AspNetCoreRateLimit/wiki

@cristipufu
Copy link
Collaborator

Hi @AprilHickson, nice work!

Can you please write some proper examples? In these appSettings, you use the regex for the verbs (which shouldn't really be the case).

@aquaosrs
Copy link
Author

Thanks @cristipufu!

I have updated both my version of the wiki, as I don't think I can do a PR for the wiki

https://github.com/AprilHickson/AspNetCoreRateLimit/wiki/ClientRateLimitMiddleware#defining-rate-limit-rules
and
https://github.com/AprilHickson/AspNetCoreRateLimit/wiki/IpRateLimitMiddleware#defining-rate-limit-rules

And I have also updated the appsettings.Regex.json with some better examples of regex patterns.

Let me know if there are any other issues or if I had misunderstood your comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants