From bfb827a418e8ddd7f6e435bdcfdbd35c12407692 Mon Sep 17 00:00:00 2001 From: strawberry Date: Sun, 5 May 2024 15:48:43 -0400 Subject: [PATCH] send Cache-Control and CORS header for remote thumbnail responses Signed-off-by: strawberry --- src/api/client_server/media.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/client_server/media.rs b/src/api/client_server/media.rs index ccbbfcd2..0de61233 100644 --- a/src/api/client_server/media.rs +++ b/src/api/client_server/media.rs @@ -376,8 +376,8 @@ pub(crate) async fn get_content_thumbnail_route( Ok(get_content_thumbnail::v3::Response { file: get_thumbnail_response.file, content_type: get_thumbnail_response.content_type, - cross_origin_resource_policy: get_thumbnail_response.cross_origin_resource_policy, - cache_control: get_thumbnail_response.cache_control, + cross_origin_resource_policy: Some(CORP_CROSS_ORIGIN.to_owned()), + cache_control: Some(CACHE_CONTROL_IMMUTABLE.to_owned()), content_disposition: Some("attachment".to_owned()), }) }, @@ -452,8 +452,8 @@ async fn get_remote_content( file: content_response.file, content_type: content_response.content_type, content_disposition: Some("attachment".to_owned()), - cross_origin_resource_policy: content_response.cross_origin_resource_policy, - cache_control: content_response.cache_control, + cross_origin_resource_policy: Some(CORP_CROSS_ORIGIN.to_owned()), + cache_control: Some(CACHE_CONTROL_IMMUTABLE.to_owned()), }) }