feat: add no-auth-read options

This commit is contained in:
sigoden
2022-05-30 12:40:57 +08:00
parent 8fbc742c52
commit d9547ad00b
3 changed files with 17 additions and 6 deletions

View File

@@ -319,6 +319,9 @@ impl InnerService {
let value = std::str::from_utf8(&value)?;
return Ok(value == auth);
} else {
if self.args.no_auth_read && req.method() == Method::GET {
return Ok(true);
}
return Ok(false);
}
}