mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 09:09:03 +03:00
fix: strange issue that occurs only on Microsoft WebDAV (#382)
This commit is contained in:
@@ -100,6 +100,7 @@ impl AccessControl {
|
||||
path: &str,
|
||||
method: &Method,
|
||||
authorization: Option<&HeaderValue>,
|
||||
guard_options: bool,
|
||||
) -> (Option<String>, Option<AccessPaths>) {
|
||||
if let Some(authorization) = authorization {
|
||||
if let Some(user) = get_auth_user(authorization) {
|
||||
@@ -116,7 +117,7 @@ impl AccessControl {
|
||||
return (None, None);
|
||||
}
|
||||
|
||||
if method == Method::OPTIONS {
|
||||
if !guard_options && method == Method::OPTIONS {
|
||||
return (None, Some(AccessPaths::new(AccessPerm::ReadOnly)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user