mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
Incorrent content-type sent for clients
This commit is contained in:
parent
58613c958c
commit
6917def011
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue