1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

allow to override response body encoding

This commit is contained in:
Nikolay Kim
2019-03-27 11:29:31 -07:00
parent 3edc515bac
commit e254fe4f9c
8 changed files with 125 additions and 31 deletions

View File

@ -27,7 +27,7 @@ fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.wrap(middleware::DefaultHeaders::new().header("X-Version", "0.2"))
.wrap(middleware::Compress::default())
.wrap(middleware::encoding::Compress::default())
.wrap(middleware::Logger::default())
.service(index)
.service(no_params)