-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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 a middleware to enforce request size limits #40452
Comments
Thanks for contacting us. We're moving this issue to the |
Thanks for contacting us. We're moving this issue to the |
YARP needs this too: dotnet/yarp#640 |
A couple of limits are enforced by MVC filters. In addition, part of the Request Decompression middleware - #40080 limits specified by
RequestSizeLimitAttribute
are enforced for compressed requests if the middleware is present (e.g.Content-Encoding: gz
), but not for regular requests.The suggestion is to introduce a new middleware that can enforce request size limits. The middleware's primarily role is to configure existing HTTP features based on the presence of attributes on endpoints. In addition to this, we can have endpoint middleware enforce that the middleware was present if it detects endpoints with size limiting attributes.
The text was updated successfully, but these errors were encountered: