-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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 method level guard for servlet filter and Its test code #282
Conversation
In addition, I submit test code for the method scenario
Codecov Report
@@ Coverage Diff @@
## master #282 +/- ##
===========================================
+ Coverage 46.27% 46.37% +0.1%
- Complexity 927 929 +2
===========================================
Files 181 181
Lines 5746 5753 +7
Branches 830 832 +2
===========================================
+ Hits 2659 2668 +9
+ Misses 2751 2741 -10
- Partials 336 344 +8
Continue to review full report at Codecov.
|
...entinel-web-servlet/src/main/java/com/alibaba/csp/sentinel/adapter/servlet/CommonFilter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for contributing! |
…lter (alibaba#282) - Add HTTP method level support for servlet filter with a init parameter `HTTP_METHOD_SPECIFY` as the switch. This is useful for REST APIs. - Add test cases and fix test bug by reset the cluster node in ClusterBuilderSlot
Describe what this PR does / why we need it
This PR makes Sentinel Servlet Filter support Http method level flow control if necessary
Does this pull request fix one issue?
Fixes #247
Describe how you did it
The implementation steps are as follows:
Describe how to verify it
This PR include the test code to verify it. The test code is in the package "com.alibaba.csp.sentinel.adapter.servletmethod"
Special notes for reviews