From 6917def01179131d8a5fe46e8e167d73a954bce4 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Sun, 7 Apr 2024 17:37:30 -1000 Subject: [PATCH] Incorrent content-type sent for clients --- server.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server.ts b/server.ts index 6aaec938..5629fb10 100644 --- a/server.ts +++ b/server.ts @@ -186,7 +186,9 @@ export const createServer = ( // Serve from pages/dist/assets if (await file.exists()) { - return clientResponse(file); + return clientResponse(file, 200, { + "Content-Type": file.type, + }); } return errorResponse("Asset not found", 404); } @@ -197,7 +199,9 @@ export const createServer = ( const file = Bun.file("./pages/dist/index.html"); // Serve from pages/dist - return clientResponse(file); + return clientResponse(file, 200, { + "Content-Type": file.type, + }); } const proxy = await fetch( req.url.replace(