mirror of https://github.com/rwf2/Rocket.git
Add a few missing pieces of 'compression' documentation.
This commit is contained in:
parent
0a3960b031
commit
0666e425fe
|
@ -39,7 +39,14 @@ impl Default for Context {
|
|||
/// - `application/octet-stream`
|
||||
///
|
||||
/// The excluded types can be changed changing the `compress.exclude` Rocket
|
||||
/// configuration property.
|
||||
/// configuration property in Rocket.toml. The default `Content-Type` exclusions
|
||||
/// will be ignored if this is set, and must be added back in one by one if
|
||||
/// desired.
|
||||
///
|
||||
/// ```toml
|
||||
/// [global.compress]
|
||||
/// exclude = ["video/*", "application/x-xz"]
|
||||
/// ```
|
||||
///
|
||||
/// # Usage
|
||||
///
|
||||
|
|
|
@ -15,6 +15,13 @@
|
|||
//! default-features = false
|
||||
//! features = ["compression"]
|
||||
//! ```
|
||||
//!
|
||||
//! # Security Implications
|
||||
//!
|
||||
//! In some cases, HTTP compression on a site served over HTTPS can make a web
|
||||
//! application vulnerable to attacks including BREACH. These risks should be
|
||||
//! evaluated in the context of your application before enabling compression.
|
||||
//!
|
||||
#[cfg(feature="brotli_compression")] extern crate brotli;
|
||||
#[cfg(feature="gzip_compression")] extern crate flate2;
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@ library. Among these are:
|
|||
* [`Json`] - Automatically serializes values into JSON.
|
||||
* [`MsgPack`] - Automatically serializes values into MessagePack.
|
||||
* [`Template`] - Renders a dynamic template using handlebars or Tera.
|
||||
* [`Compress`] - Compresses a response at the HTTP layer.
|
||||
|
||||
[`status`]: @api/rocket/response/status/
|
||||
[`response`]: @api/rocket/response/
|
||||
|
@ -250,6 +251,7 @@ library. Among these are:
|
|||
[`Stream`]: @api/rocket/response/struct.Stream.html
|
||||
[`Flash`]: @api/rocket/response/struct.Flash.html
|
||||
[`MsgPack`]: @api/rocket_contrib/msgpack/struct.MsgPack.html
|
||||
[`Compress`]: @api/rocket_contrib/compression/struct.Compress.html
|
||||
|
||||
### Streaming
|
||||
|
||||
|
|
Loading…
Reference in New Issue