This commit is contained in:
@@ -91,6 +91,8 @@ async fn serve_firmware(
|
||||
) -> impl Responder {
|
||||
let (service, product, config, version) = path.into_inner();
|
||||
let version = version.replace(['.', '_'], "-");
|
||||
let service = service.to_lowercase();
|
||||
let config = config.to_lowercase();
|
||||
let Ok(service) = Services::from_str(&service) else {
|
||||
return HttpResponse::NotFound().finish();
|
||||
};
|
||||
@@ -101,7 +103,7 @@ async fn serve_firmware(
|
||||
Services::Firmware => PathBuf::from(format!("{product}/firmware_{config}_{version}.bin")),
|
||||
Services::Filesystem => PathBuf::from(format!("{product}/filesystem_{config}_{version}.bin")),
|
||||
};
|
||||
|
||||
|
||||
let file_path = fw_root_path.join(&file_path);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user