fairingrey/actix-realworld-example-app

The authorization would better be a middleware wrapped

Opened this issue · 0 comments

example

App::new() .register_data(Data::new(state)) .wrap(Logger::default()) .wrap(cors) .wrap(crate::middleware::authen_middleware::Authentication) .configure(routes) }) .bind(&bind_address) .unwrap_or_else(|_| panic!("Could not bind server to address {}", &bind_address)) .start();