have / work for the public rpc

This commit is contained in:
Bryan Stitt 2022-10-21 21:12:05 +00:00
parent 9422a335a7
commit d574ac9add
2 changed files with 3 additions and 1 deletions

@ -22,7 +22,7 @@ public_requests_per_minute = 0
response_cache_max_bytes = 10_000_000_000
[app.allowed_origin_requests_per_minute]
"https://chainlist.org" = 10_000
"https://chainlist.org" = 1_000
[balanced_rpcs]

@ -52,6 +52,8 @@ pub async fn serve(port: u16, proxy_app: Arc<Web3ProxyApp>) -> anyhow::Result<()
// build our axum Router
let app = Router::new()
// routes should be ordered most to least common
.route("/", post(rpc_proxy_http::proxy_web3_rpc))
.route("/", get(rpc_proxy_ws::websocket_handler))
.route("/rpc", post(rpc_proxy_http::proxy_web3_rpc))
.route("/rpc", get(rpc_proxy_ws::websocket_handler))
.route(