Incorrent content-type sent for clients

This commit is contained in:
Jesse Wierzbinski 2024-04-07 17:37:30 -10:00
parent 58613c958c
commit 6917def011
No known key found for this signature in database

View file

@ -186,7 +186,9 @@ export const createServer = (
// Serve from pages/dist/assets // Serve from pages/dist/assets
if (await file.exists()) { if (await file.exists()) {
return clientResponse(file); return clientResponse(file, 200, {
"Content-Type": file.type,
});
} }
return errorResponse("Asset not found", 404); return errorResponse("Asset not found", 404);
} }
@ -197,7 +199,9 @@ export const createServer = (
const file = Bun.file("./pages/dist/index.html"); const file = Bun.file("./pages/dist/index.html");
// Serve from pages/dist // Serve from pages/dist
return clientResponse(file); return clientResponse(file, 200, {
"Content-Type": file.type,
});
} }
const proxy = await fetch( const proxy = await fetch(
req.url.replace( req.url.replace(