1
0
mirror of https://github.com/actix/examples synced 2024-11-30 09:12:54 +01:00

updated code comment about log middleware

This commit is contained in:
dowwie 2019-06-01 09:27:34 -04:00
parent 4e3a42d77d
commit a8b49dfaec
3 changed files with 3 additions and 2 deletions

View File

@ -84,7 +84,7 @@ fn main() -> io::Result<()> {
App::new()
// cookie session middleware
.wrap(CookieSession::signed(&[0; 32]).secure(false))
// enable logger
// enable logger - always register actix-web Logger middleware last
.wrap(middleware::Logger::default())
// register favicon
.service(favicon)

View File

@ -27,6 +27,7 @@ fn main() -> std::io::Result<()> {
.name("auth-example")
.secure(false),
))
// enable logger - always register actix-web Logger middleware last
.wrap(middleware::Logger::default())
.service(web::resource("/login").route(web::post().to(login)))
.service(web::resource("/logout").to(logout))

View File

@ -28,7 +28,7 @@ fn main() -> std::io::Result<()> {
App::new()
// redis session middleware
.wrap(RedisSession::new("127.0.0.1:6379", &[0; 32]))
// enable logger
// enable logger - always register actix-web Logger middleware last
.wrap(middleware::Logger::default())
// register simple route, handle all methods
.service(web::resource("/").to(index))