From 48a01d59e72976452e72c2125b37804e4acf2514 Mon Sep 17 00:00:00 2001 From: akvlad Date: Tue, 31 Oct 2023 17:47:53 +0200 Subject: [PATCH] #fix: content-type --- lib/bun_wrapper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bun_wrapper.js b/lib/bun_wrapper.js index 6fe38a2c..555c41da 100644 --- a/lib/bun_wrapper.js +++ b/lib/bun_wrapper.js @@ -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 })