From ff3c0543399cf863d2f6ed7b47d600a9faff8c19 Mon Sep 17 00:00:00 2001 From: qq_41923622 Date: Fri, 21 Feb 2025 12:36:00 +0800 Subject: [PATCH] Fri Feb 21 12:36:00 CST 2025 inscode --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 37a1515..e26f742 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ const querystring = require('querystring'); let getFormData = (req)=>{ return new Promise((resolve,reject)=>{ - if (req.method === 'POST' && req.headers['content-type'] === 'application/x-www-form-urlencoded') { + if (req.method === 'POST' && /application\/x\-www\-form\-urlencoded/.test(req.headers['content-type'])) { let body = ''; // 监听 data 事件,接收数据块 -- GitLab