First stable version of Yii HTTP Middleware was released.
The package provides a collection of PSR-15 middleware focused on HTTP features:
ContentLengthMiddleware
— manages theContent-Length
header in the response;CorsAllowAllMiddleware
— adds CORS headers allowing any request origins in later requests;ForceSecureConnectionMiddleware
— redirects insecure requests from HTTP to HTTPS and adds headers necessary to enhance the security policy;HeadRequestMiddleware
— removes body from response forHEAD
request;HttpCacheMiddleware
— implements HTTP caching usingCache-Control
,ETag
, andLast-Modified
headers;TagRequestMiddleware
— adds specific header to request, which can be used for logging or debugging purposes.