From ebcbdd2bbbc24df47dd2f93bf8f9b588153e43c3 Mon Sep 17 00:00:00 2001 From: youfeed <11247005@qq.com> Date: Thu, 7 Dec 2023 06:42:55 +0800 Subject: [PATCH] 'update' --- functions/drive/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/drive/index.js b/functions/drive/index.js index d2fb703..91c339f 100644 --- a/functions/drive/index.js +++ b/functions/drive/index.js @@ -5,7 +5,8 @@ export async function onRequest(context) { const request = context.request const method = request.method const body = await request.body - return new Response(JSON.stringify([body,params,method,request], null, 2),{headers:{'content-type':'application/json;charset=UTF-8'}}); + const contentType = headers.get("content-type") || ""; + return new Response(JSON.stringify([body,params,method,request,contentType], null, 2),{headers:{'content-type':'application/json;charset=UTF-8'}}); // {request,env} const secret = env.secret; const signature = request.headers.get("Signature");