serve from file instead of object
This commit is contained in:
parent
805d19451c
commit
7fd4342405
|
|
@ -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(),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue