Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The authorization would better be a middleware wrapped #15

Open
369pie opened this issue Oct 7, 2019 · 0 comments
Open

The authorization would better be a middleware wrapped #15

369pie opened this issue Oct 7, 2019 · 0 comments

Comments

@369pie
Copy link

369pie commented Oct 7, 2019

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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant