From 21d3b8fef47f8cc76cec51480530e5f46642a0e5 Mon Sep 17 00:00:00 2001 From: Alejo Thomas Ortega Date: Mon, 21 Oct 2024 14:08:04 -0300 Subject: [PATCH] fix: opt-in of Content-Type header on /contents endpoint --- content/src/controller/handlers/get-content-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/src/controller/handlers/get-content-handler.ts b/content/src/controller/handlers/get-content-handler.ts index 5504b0cbb..bf35f53ec 100644 --- a/content/src/controller/handlers/get-content-handler.ts +++ b/content/src/controller/handlers/get-content-handler.ts @@ -4,7 +4,7 @@ import { createContentFileHeaders } from '../utils' // Method: GET or HEAD export async function getContentHandler(context: HandlerContextWithPath<'storage', '/contents/:hashId'>) { - const shouldCalculateContentType = context.request.headers.get('Accept') === 'Any' + const shouldCalculateContentType = context.url.searchParams.has('includeMimeType') const hash = context.params.hashId const content: ContentItem | undefined = await context.components.storage.retrieve(hash)