Skip to content

Commit

Permalink
set response content type
Browse files Browse the repository at this point in the history
  • Loading branch information
kremalicious committed Oct 10, 2023
1 parent 43e510b commit 794a95d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/pages/api/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
})
}
5 changes: 4 additions & 1 deletion src/pages/feed.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export async function GET(context: AstroConfig) {
}
],
items
})
}),
{
headers: { 'content-type': 'application/json' }
}
)
}
4 changes: 3 additions & 1 deletion src/pages/manifest.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
})
}

1 comment on commit 794a95d

@vercel
Copy link

@vercel vercel bot commented on 794a95d Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog – ./

blog-kremalicious.vercel.app
blog-git-main-kremalicious.vercel.app
kremalicious.vercel.app

Please sign in to comment.