Skip to content

Add a middleware to enforce request size limits #40452

@pranavkm

Description

@pranavkm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: DesignThis issue requires design work before implementating.area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions