add: small littleweb browser changes

This commit is contained in:
trisua 2025-07-08 17:38:24 -04:00
parent e7febc7c7e
commit 388ccbf58c
9 changed files with 194 additions and 21 deletions

View file

@ -110,9 +110,14 @@ pub async fn delete_request(
}
pub async fn get_file_request(
Path(addr): Path<String>,
Path(mut addr): Path<String>,
Extension(data): Extension<State>,
) -> impl IntoResponse {
if !addr.starts_with("atto://") {
addr = format!("atto://{addr}");
}
// ...
let data = &(data.read().await).0;
let (subdomain, domain, tld, path) = Domain::from_str(&addr);