Releases: tower-rs/tower-http
Releases · tower-rs/tower-http
v0.4.0
Added
- decompression: Add
RequestDecompression
middleware (#282) - compression: Implement
Default
forCompressionBody
(#323) - compression, decompression: Support zstd (de)compression (#322)
Changed
- serve_dir:
ServeDir
andServeFile
's error types are nowInfallible
and any IO errors
will be converted into responses. Usetry_call
to generate error responses manually (BREAKING) (#283) - serve_dir:
ServeDir::fallback
andServeDir::not_found_service
now requires
the fallback service to useInfallible
as its error type (BREAKING) (#283) - compression, decompression: Tweak prefered compression encodings (#325)
Removed
- Removed
RequireAuthorization
in favor ofValidateRequest
(BREAKING) (#290)
Fixed
v0.3.5
v0.3.4
v0.3.3
Added
- serve_dir: Add
ServeDir::call_fallback_on_method_not_allowed
to allow calling the fallback
for requests that aren'tGET
orHEAD
(#264) - request_id: Add
MakeRequestUuid
for generating request ids using UUIDs (#266)
Fixed
- serve_dir: Include
Allow
header for405 Method Not Allowed
responses (#263)
v0.3.2
v0.3.1
Fixed
- cors: Only send a single origin in
Access-Control-Allow-Origin
header when a list of
allowed origins is configured (the previous behavior of sending a comma-separated list like for
allowed methods and allowed headers is not allowed by any standard)
v0.3.0
Added
- fs: Add
ServeDir::{fallback, not_found_service}
for calling another service if
the file cannot be found (#243) - fs: Add
SetStatus
to override status codes (#248) ServeDir
andServeFile
now respond with405 Method Not Allowed
to requests where the
method isn'tGET
orHEAD
(#249)- cors: Added
CorsLayer::very_permissive
which is like
CorsLayer::permissive
except it (truly) allows credentials. This is made
possible by mirroring the request's origin as well as method and headers
back as CORS-whitelisted ones (#237) - cors: Allow customizing the value(s) for the
Vary
header (#237)
Changed
- cors: Removed
allow-credentials: true
fromCorsLayer::permissive
.
It never actually took effect in compliant browsers because it is mutually
exclusive with the*
wildcard (Any
) on origins, methods and headers (#237) - cors: Rewrote the CORS middleware. Almost all existing usage patterns
will continue to work. (BREAKING) (#237) - cors: The CORS middleware will now panic if you try to use
Any
in
combination with.allow_credentials(true)
. This configuration worked
before, but resulted in browsers ignoring theallow-credentials
header,
which defeats the purpose of setting it and can be very annoying to debug
(#237)
Fixed
- fs: Fix content-length calculation on range requests (#228)