serve from file instead of object

This commit is contained in:
eko 2025-12-02 16:10:05 +07:00
parent 805d19451c
commit 7fd4342405
1 changed files with 5 additions and 0 deletions

View File

@ -202,6 +202,11 @@ export const createServer = async () => {
//set content type //set content type
opt?.headers?.set("Content-Type", fileType.mime); opt?.headers?.set("Content-Type", fileType.mime);
} }
return new Response(content, {
status: 200,
headers: opt?.headers || new Headers(),
});
} }