notfound-fix
Some checks failed
deploy / deploy (push) Failing after 11s

This commit is contained in:
Untone 2024-10-02 19:34:48 +03:00
parent 8ab7f6194d
commit 5b33e4a566

View File

@ -128,7 +128,13 @@ pub async fn proxy_handler(
info!("proxy_handler вызван с путем: {}", path);
// весь запрошенный путь
let requested_path = state.get_path(&path).await.unwrap().unwrap();
let requested_path = match state.get_path(&path).await {
Some(Some(path)) => path,
_ => {
warn!("Путь не найден: {}", path);
return Ok(HttpResponse::NotFound().finish());
}
};
info!("Запрошенный путь: {}", requested_path);
// имя файла