1
0
mirror of https://github.com/actix/actix-website synced 2025-01-23 08:34:35 +01:00

17 lines
401 B
Rust
Raw Normal View History

2019-06-17 15:15:33 -04:00
// <auto>
use actix_web::{
http::ContentEncoding, middleware, web, App, HttpRequest, HttpResponse,
};
fn index(req: HttpRequest) -> HttpResponse {
HttpResponse::Ok().body("data")
}
fn main() {
let app = App::new()
// v- disable compression for all routes
.wrap(middleware::Compress::new(ContentEncoding::Identity))
.route("/", web::get().to(index));
}
// </auto>