fix: not found dir when allow_upload is false

This commit is contained in:
sigoden 2022-05-31 16:55:52 +08:00
parent 19d7b36462
commit fc090b6930

View file

@ -139,7 +139,7 @@ impl InnerService {
self.handle_send_file(filepath, req.headers(), &mut res)
.await?
}
Method::GET if is_miss && path.ends_with('/') => {
Method::GET if allow_upload && is_miss && path.ends_with('/') => {
self.handle_ls_dir(filepath, false, &mut res).await?
}
Method::OPTIONS => {