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:
parent
43e510ba1d
commit
794a95db38
@ -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' }
|
||||
})
|
||||
}
|
||||
|
@ -45,6 +45,9 @@ export async function GET(context: AstroConfig) {
|
||||
}
|
||||
],
|
||||
items
|
||||
})
|
||||
}),
|
||||
{
|
||||
headers: { 'content-type': 'application/json' }
|
||||
}
|
||||
)
|
||||
}
|
||||
|
@ -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' }
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user