diff --git a/basics/src/main.rs b/basics/src/main.rs index 5d74e3d9..b7406f99 100644 --- a/basics/src/main.rs +++ b/basics/src/main.rs @@ -82,10 +82,10 @@ fn main() -> io::Result<()> { HttpServer::new(|| { App::new() - // enable logger - .wrap(middleware::Logger::default()) // cookie session middleware .wrap(CookieSession::signed(&[0; 32]).secure(false)) + // enable logger + .wrap(middleware::Logger::default()) // register favicon .service(favicon) // register simple route, handle all methods diff --git a/cookie-auth/src/main.rs b/cookie-auth/src/main.rs index 9d1f8577..2e428014 100644 --- a/cookie-auth/src/main.rs +++ b/cookie-auth/src/main.rs @@ -22,12 +22,12 @@ fn main() -> std::io::Result<()> { HttpServer::new(|| { App::new() - .wrap(middleware::Logger::default()) .wrap(IdentityService::new( CookieIdentityPolicy::new(&[0; 32]) .name("auth-example") .secure(false), )) + .wrap(middleware::Logger::default()) .service(web::resource("/login").route(web::post().to(login))) .service(web::resource("/logout").to(logout)) .service(web::resource("/").route(web::get().to(index))) diff --git a/redis-session/src/main.rs b/redis-session/src/main.rs index 0c49c6bf..2705866f 100644 --- a/redis-session/src/main.rs +++ b/redis-session/src/main.rs @@ -26,10 +26,10 @@ fn main() -> std::io::Result<()> { HttpServer::new(|| { App::new() - // enable logger - .wrap(middleware::Logger::default()) // redis session middleware .wrap(RedisSession::new("127.0.0.1:6379", &[0; 32])) + // enable logger + .wrap(middleware::Logger::default()) // register simple route, handle all methods .service(web::resource("/").to(index)) })