Add option for user to set max size limit for RPC requests (#9010)
* Add option for user to set max size limit for RPC requests as requested in #8961. * Add max_payload to tests. * Change name for max payload option and change value from NUM to MB. * Fix broken test. * Fix incorrect indentation.
This commit is contained in:
committed by
Tomasz Drwięga
parent
34bf2452c3
commit
67721f3413
@@ -879,6 +879,10 @@ impl Configuration {
|
||||
_ => 1,
|
||||
},
|
||||
processing_threads: self.args.arg_jsonrpc_threads,
|
||||
max_payload: match self.args.arg_jsonrpc_max_payload {
|
||||
Some(max) if max > 0 => max as usize,
|
||||
_ => 5usize,
|
||||
},
|
||||
};
|
||||
|
||||
Ok(conf)
|
||||
|
||||
Reference in New Issue
Block a user