refactor: improve invalid auth (#356)

This commit is contained in:
sigoden
2024-01-19 10:25:11 +08:00
committed by GitHub
parent 95eb648411
commit f92c8ee91d
2 changed files with 21 additions and 2 deletions

View File

@@ -109,11 +109,11 @@ impl AccessControl {
}
if check_auth(authorization, method.as_str(), &user, pass).is_some() {
return (Some(user), paths.find(path, !is_readonly_method(method)));
} else {
return (None, None);
}
}
}
return (None, None);
}
if method == Method::OPTIONS {