block eth_subscribe and eth_unsubscribe over http

This commit is contained in:
Bryan Stitt 2022-12-22 12:05:15 -08:00
parent 9885bdfd8c
commit 95045ec78e

@ -1007,6 +1007,16 @@ impl Web3ProxyApp {
// TODO: return a real response if all backends are syncing or if no servers in sync
json!(false)
}
"eth_subscribe" => {
return Err(anyhow::anyhow!(
"notifications not supported. eth_subscribe is only available over a websocket"
));
}
"eth_unsubscribe" => {
return Err(anyhow::anyhow!(
"notifications not supported. eth_unsubscribe is only available over a websocket"
));
}
"net_listening" => {
// no stats on this. its cheap
// TODO: only if there are some backends on balanced_rpcs?