diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 3db64d8..659d529 100644 --- a/src/main.rs +++ b/src/main.rs @@ -162,7 +162,7 @@ struct Auth; impl Middleware<MiniserveConfig> for Auth { fn response(&self, req: &mut HttpRequest<MiniserveConfig>, resp: HttpResponse) -> Result<Response> { - if let Some(required_auth) = &req.state().auth { + if let &Some(ref required_auth) = &req.state().auth { if let Some(auth_headers) = req.headers().get(header::AUTHORIZATION) { let auth_req = match parse_basic_auth(auth_headers) { Ok(auth_req) => auth_req, |