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

17 lines
396 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 {
2019-06-17 15:15:33 -04:00
HttpResponse::Ok().body("data")
}
pub fn main() {
App::new()
2019-06-17 15:15:33 -04:00
// v- disable compression for all routes
.wrap(middleware::Compress::new(ContentEncoding::Identity))
.route("/", web::get().to(index));
}
// </auto>