From dbda653812613a2a878cebda6461652de2dbaf4f Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 21 Aug 2023 15:18:57 -0700 Subject: [PATCH] trim trailing slashes isn't working as expected. put the routes back for now --- web3_proxy/src/frontend/mod.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/web3_proxy/src/frontend/mod.rs b/web3_proxy/src/frontend/mod.rs index e27a45a8..3032f271 100644 --- a/web3_proxy/src/frontend/mod.rs +++ b/web3_proxy/src/frontend/mod.rs @@ -81,35 +81,64 @@ pub async fn serve( post(rpc_proxy_http::proxy_web3_rpc_with_key) .get(rpc_proxy_ws::websocket_handler_with_key), ) + .route( + "/rpc/:rpc_key/", + post(rpc_proxy_http::proxy_web3_rpc_with_key) + .get(rpc_proxy_ws::websocket_handler_with_key), + ) // authenticated debug route .route( "/debug/:rpc_key", post(rpc_proxy_http::debug_proxy_web3_rpc_with_key) .get(rpc_proxy_ws::debug_websocket_handler_with_key), ) + .route( + "/debug/:rpc_key/", + post(rpc_proxy_http::debug_proxy_web3_rpc_with_key) + .get(rpc_proxy_ws::debug_websocket_handler_with_key), + ) // public fastest .route( "/fastest", post(rpc_proxy_http::fastest_proxy_web3_rpc) .get(rpc_proxy_ws::fastest_websocket_handler), ) + .route( + "/fastest/", + post(rpc_proxy_http::fastest_proxy_web3_rpc) + .get(rpc_proxy_ws::fastest_websocket_handler), + ) // authenticated fastest with and without trailing slash .route( "/fastest/:rpc_key", post(rpc_proxy_http::fastest_proxy_web3_rpc_with_key) .get(rpc_proxy_ws::fastest_websocket_handler_with_key), ) + .route( + "/fastest/:rpc_key/", + post(rpc_proxy_http::fastest_proxy_web3_rpc_with_key) + .get(rpc_proxy_ws::fastest_websocket_handler_with_key), + ) // public versus .route( "/versus", post(rpc_proxy_http::versus_proxy_web3_rpc).get(rpc_proxy_ws::versus_websocket_handler), ) + .route( + "/versus/", + post(rpc_proxy_http::versus_proxy_web3_rpc).get(rpc_proxy_ws::versus_websocket_handler), + ) // authenticated versus .route( "/versus/:rpc_key", post(rpc_proxy_http::versus_proxy_web3_rpc_with_key) .get(rpc_proxy_ws::versus_websocket_handler_with_key), ) + .route( + "/versus/:rpc_key/", + post(rpc_proxy_http::versus_proxy_web3_rpc_with_key) + .get(rpc_proxy_ws::versus_websocket_handler_with_key), + ) // // System things //