From 11ea8a19d1481b0660e5a2765da6e67d3e8aa72c Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 7 Mar 2025 11:00:48 +0100 Subject: Add asynchronous directory size counting This is enabled by default and without an option to toggle it off as it's asynchronous and shouldn't block the server thread. --- src/auth.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/auth.rs') diff --git a/src/auth.rs b/src/auth.rs index fa28c4a..3bd9313 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -1,4 +1,4 @@ -use actix_web::{HttpMessage, dev::ServiceRequest}; +use actix_web::{HttpMessage, dev::ServiceRequest, web}; use actix_web_httpauth::extractors::basic::BasicAuth; use sha2::{Digest, Sha256, Sha512}; @@ -77,7 +77,10 @@ pub async fn handle_auth( req: ServiceRequest, cred: BasicAuth, ) -> actix_web::Result { - let required_auth = &req.app_data::().unwrap().auth; + let required_auth = &req + .app_data::>() + .unwrap() + .auth; req.extensions_mut().insert(CurrentUser { name: cred.user_id().to_string(), -- cgit v1.2.3