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:
parent
4e3a42d77d
commit
a8b49dfaec
@ -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)
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user