diff --git a/src/pages/api/posts.ts b/src/pages/api/posts.ts index ef5a45ab..1307cf53 100644 --- a/src/pages/api/posts.ts +++ b/src/pages/api/posts.ts @@ -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' } + }) } diff --git a/src/pages/feed.json.ts b/src/pages/feed.json.ts index ca7454db..c6533f31 100644 --- a/src/pages/feed.json.ts +++ b/src/pages/feed.json.ts @@ -45,6 +45,9 @@ export async function GET(context: AstroConfig) { } ], items - }) + }), + { + headers: { 'content-type': 'application/json' } + } ) } diff --git a/src/pages/manifest.json.ts b/src/pages/manifest.json.ts index df9a8df3..7d2d2827 100644 --- a/src/pages/manifest.json.ts +++ b/src/pages/manifest.json.ts @@ -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' } + }) }