You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Middleware doc should address middleware ordering that can circumvent middleware from running if it's placed after a terminal middleware.
Proposal: Add a section after the Built-in middleware section with content something like this ...
Middleware ordering
Terminal middleware, which processes a request and returns a response, placed before another middleware will prevent the downstream middleware from executing. For example, if you place the Static File Middleware before the Response Compression Middleware, your static files cannot be compressed. The Static File Middleware will fully handle requests for static files, returning them to clients before the Response Compression Middleware can execute.
If you intend to use the Response Compression Middleware to compress your static files, position the Response Compression Middleware earlier in the request processing pipeline. The following example demonstrates the middleware arrangement that would result in compression of your static files.
Per @JunTaoLuo in #2505 (comment)
The Middleware doc should address middleware ordering that can circumvent middleware from running if it's placed after a terminal middleware.
Proposal: Add a section after the Built-in middleware section with content something like this ...
Middleware ordering
Terminal middleware, which processes a request and returns a response, placed before another middleware will prevent the downstream middleware from executing. For example, if you place the Static File Middleware before the Response Compression Middleware, your static files cannot be compressed. The Static File Middleware will fully handle requests for static files, returning them to clients before the Response Compression Middleware can execute.
If you intend to use the Response Compression Middleware to compress your static files, position the Response Compression Middleware earlier in the request processing pipeline. The following example demonstrates the middleware arrangement that would result in compression of your static files.
The text was updated successfully, but these errors were encountered: