Skip to content

Commit

Permalink
#fix: content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Oct 31, 2023
1 parent e782f17 commit 48a01d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/bun_wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const wrapper = (handler, parsers) => {
response = result
}
if (response instanceof Object && typeof response !== 'string' && !Buffer.isBuffer(response)) {
headers['Content-Type'] = 'application/json'
response = JSON.stringify(response)
}
return new Response(response, { status: status, headers: headers })
Expand Down

0 comments on commit 48a01d5

Please sign in to comment.