diff --git a/lib/http/base.js b/lib/http/base.js index bb8c1ef0..cb463a1c 100644 --- a/lib/http/base.js +++ b/lib/http/base.js @@ -437,8 +437,15 @@ HTTPBase.prototype.jsonRPC = function jsonRPC(rpc) { if (req.pathname !== '/') return; - if (typeof req.body.method !== 'string') - return; + if (req.body instanceof Array) { + for (const request of req.body) { + if (typeof request.method !== 'string') + return; + } + } else { + if (typeof req.body.method !== 'string') + return; + } let json = await rpc.call(req.body, req.query);