feat: deploy to vercel & use ALB on ecs
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user