diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2018-04-30 10:55:16 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2018-04-30 10:55:16 +0000 |
commit | c0d517f84c266a342b739ac64a100630dc76320e (patch) | |
tree | 0712eda6b11cc933079c8cbed6b9a1c915cdf5fc /src/main.rs | |
parent | Add proper HTTP Basic auth (diff) | |
download | miniserve-c0d517f84c266a342b739ac64a100630dc76320e.tar.gz miniserve-c0d517f84c266a342b739ac64a100630dc76320e.zip |
Fix for stable
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, |