-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Add a middleware to enforce request size limits #40452
Copy link
Copy link
Open
Labels
Needs: DesignThis issue requires design work before implementating.This issue requires design work before implementating.area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs: DesignThis issue requires design work before implementating.This issue requires design work before implementating.area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions