1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 01:03:37 +01:00

set response content type

This commit is contained in:
Matthias Kretschmann 2023-10-10 22:50:39 +01:00
parent 43e510ba1d
commit 794a95db38
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 10 additions and 3 deletions

View File

@ -3,5 +3,7 @@ import { getAllPostsForSearch } from '@lib/astro'
export const GET: APIRoute = async () => {
const allPosts = await getAllPostsForSearch()
return new Response(JSON.stringify(allPosts))
return new Response(JSON.stringify(allPosts), {
headers: { 'content-type': 'application/json' }
})
}

View File

@ -45,6 +45,9 @@ export async function GET(context: AstroConfig) {
}
],
items
})
}),
{
headers: { 'content-type': 'application/json' }
}
)
}

View File

@ -33,5 +33,7 @@ export const GET: APIRoute = async () => {
icons
}
return new Response(JSON.stringify(manifest))
return new Response(JSON.stringify(manifest), {
headers: { 'content-type': 'application/json' }
})
}