mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
rpc server: add rate limiting middleware (#3301)
Add RPC server rate limiting which can be utilized by the CLI `--rpc-rate-limit <calls/per minute>` Resolves first part of https://github.com/paritytech/polkadot-sdk/issues/3028 //cc @PierreBesson @kogeler you might be interested in this one --------- Co-authored-by: James Wilson <james@jsdw.me> Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
This commit is contained in:
@@ -84,6 +84,7 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
|
||||
rpc_max_subs_per_conn: Default::default(),
|
||||
rpc_port: 9944,
|
||||
rpc_message_buffer_capacity: Default::default(),
|
||||
rpc_rate_limit: None,
|
||||
prometheus_config: None,
|
||||
telemetry_endpoints: None,
|
||||
default_heap_pages: None,
|
||||
|
||||
@@ -80,6 +80,7 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
|
||||
rpc_max_subs_per_conn: Default::default(),
|
||||
rpc_port: 9944,
|
||||
rpc_message_buffer_capacity: Default::default(),
|
||||
rpc_rate_limit: None,
|
||||
prometheus_config: None,
|
||||
telemetry_endpoints: None,
|
||||
default_heap_pages: None,
|
||||
|
||||
Reference in New Issue
Block a user