framework: fix blob response (#1012)

This commit is contained in:
undefined committed 2025-07-12 07:18:41 +08:00
1 parent f53dd455e6
commit 0699e17ce6
1 file changed
+1 -1
+1 -1
View File
@@ -117,7 +117,7 @@ export default (logger, xff, xhost) => async (ctx: KoaContext, next: Next) => {
ctx.response.status = 302;
ctx.redirect(response.redirect);
} else if (response.body) {
ctx.body = response.body;
ctx.body = response.body instanceof Blob ? Buffer.from(await response.body.arrayBuffer()) : response.body;
ctx.response.status = response.status || 200;
ctx.response.type = response.type
|| (request.json