Commit c304ff5a authored by vicotor's avatar vicotor

update rpc array request

parent b476463a
......@@ -175,7 +175,7 @@ func proxyHandler(w http.ResponseWriter, r *http.Request) {
// Try to parse as batch request first
if err := json.Unmarshal(body, &reqs); err == nil {
// Handle batch request
if len(reqs) > 1 {
if len(reqs) > 5 {
req := reqs[0]
resp := RPCResponse{
Jsonrpc: req.Jsonrpc,
......@@ -188,6 +188,8 @@ func proxyHandler(w http.ResponseWriter, r *http.Request) {
if err := json.NewEncoder(w).Encode(resp); err != nil {
log.Printf("encode response error: %v", err)
}
} else {
forwardToBackend(w, body)
}
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment