From d574ac9adda3965ab24939f35c86641fcc940d7a Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 21 Oct 2022 21:12:05 +0000 Subject: [PATCH] have / work for the public rpc --- config/example.toml | 2 +- web3_proxy/src/frontend/mod.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/example.toml b/config/example.toml index dc3675ab..35b6a2e6 100644 --- a/config/example.toml +++ b/config/example.toml @@ -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] diff --git a/web3_proxy/src/frontend/mod.rs b/web3_proxy/src/frontend/mod.rs index 961cf9c9..bdd2d87f 100644 --- a/web3_proxy/src/frontend/mod.rs +++ b/web3_proxy/src/frontend/mod.rs @@ -52,6 +52,8 @@ pub async fn serve(port: u16, proxy_app: Arc) -> 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(