Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion background.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ async function handleCrossOriginRequest(request) {

// 添加请求体(如果有)
if (requestBody && method.toLowerCase() !== 'get' && method.toLowerCase() !== 'head') {
const isPlainObject = (val) => Object.prototype.toString.call(val) === '[object Object]';
const isPlainObject = (val) => Object.prototype.toString.call(val) === '[object Object]' || Object.prototype.toString.call(val) === '[object Array]';

if (isPlainObject(requestBody) && !(requestBody instanceof FormData)) {
// 检查 Content-Type 以决定如何序列化 body
Expand Down
Loading