-
Notifications
You must be signed in to change notification settings - Fork 449
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
Refactoring & extensibility #63
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Feb 17, 2019
Closed
This was referenced Feb 17, 2019
cristipufu
changed the title
Refactor / Resolvers / Counter Key Builders / Async Stores / Wildcard Match Fixes
Refactoring & extensibility
Feb 17, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors all the duplicate code and contains multiple fixes and extensibility improvements based on the community issues.
Quick summary:
Update the library to
netstandard2.0
and the demo web app toaspnetcore3.0
, langC# 7.3
No more duplicate code
Fixes the wildcard match issues [How do you create dynamic URL (parameter) rules? #29 How to ignore query string and/or parameters #41]
Implement an async named locker for request processing [Every request waiting for the lock and blocking other requests #12] (the lock will no longer block the entire app, but only the requests that match the specific counter id)
The
AsyncLock
code is also used here and I used Ben.BlockingDetector to detect any blocking calls, so it should be just fine.Redis
-backed stores) - but now you have to manually seed the app settings client / IP policies.https://andrewlock.net/running-async-tasks-on-app-startup-in-asp-net-core-part-2/
If you want to upgrade and make it all work, you have to configure two new services in your
Startup.cs
:Summing up the breaking-chages:
appsettings.json
policies.PS: I will wait a week to discuss/talk about the changes/features before merging this.
Suggestions and feedback are most welcome.
Thanks