feat: deploy to vercel & use ALB on ecs

This commit is contained in:
2026-01-21 23:03:22 -08:00
parent cfd2e0d2c2
commit d9622ea451
11 changed files with 89 additions and 62 deletions

View File

@@ -37,7 +37,7 @@ pub async fn proxy_file(
.error_for_status_ref()
.map_err(|_| crate::error::Error::NotFound)?;
let bytes = response.bytes().await?;
let stream = response.bytes_stream();
let mime = mime_guess::from_path(&path.file)
.first_or_octet_stream()
.to_string();
@@ -45,5 +45,5 @@ pub async fn proxy_file(
Ok(HttpResponse::Ok()
.content_type(mime)
.insert_header(("Cache-Control", "public, max-age=3600"))
.body(bytes))
.streaming(stream))
}