Skip to content

Commit

Permalink
fix: opt-in of Content-Type header on /contents endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
aleortega committed Oct 21, 2024
1 parent 5638e2c commit 21d3b8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/src/controller/handlers/get-content-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 21d3b8f

Please sign in to comment.