-
Notifications
You must be signed in to change notification settings - Fork 3.4k
RequestSizeGatewayFilterFactory added #376
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
Conversation
Hi, Any comment on this |
When I get back from holidays next week |
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.
Please add a test.
@@ -17,6 +17,9 @@ | |||
|
|||
package org.springframework.cloud.gateway.config; | |||
|
|||
|
|||
import com.netflix.hystrix.HystrixObservableCommand; |
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.
Please use our import rules.
* @author Arpan | ||
*/ | ||
public class RequestSizeGatewayFilterFactory | ||
extends AbstractGatewayFilterFactory<RequestSizeGatewayFilterFactory.RequestSizeConfig> { |
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.
Tabs not spaces
Take the updated code
Codecov Report
@@ Coverage Diff @@
## master #376 +/- ##
==========================================
- Coverage 65.36% 62.43% -2.93%
==========================================
Files 4 8 +4
Lines 231 410 +179
Branches 17 34 +17
==========================================
+ Hits 151 256 +105
- Misses 68 130 +62
- Partials 12 24 +12
Continue to review full report at Codecov.
|
Created a new pull request with the review comment integrated; |
RequestSizeGatewayFilterFactory added. Which can restrict a request from reaching the downstream service , if the size of request is greater than the permissible limit. The filter can be configured in standard way. Following is an example:
And the configuration for the filter is: When it works as a default filter:
When needs to be applied in some API