chore: optimize for test auth

This commit is contained in:
sigoden
2023-02-21 16:10:51 +08:00
parent 6d9758c71d
commit ad0be71557
6 changed files with 32 additions and 18 deletions

View File

@@ -149,10 +149,7 @@ impl Server {
.map(|(k, v)| (k.to_string(), v.to_string()))
.collect();
if query_params.contains_key("auth") {
if !guard_type.is_readwrite() {
self.auth_reject(&mut res);
}
if method.as_str() == "WRITEABLE" {
return Ok(res);
}