trim trailing slashes isn't working as expected. put the routes back for now

This commit is contained in:
Bryan Stitt 2023-08-21 15:18:57 -07:00
parent 05f394437d
commit dbda653812

View File

@ -81,35 +81,64 @@ pub async fn serve(
post(rpc_proxy_http::proxy_web3_rpc_with_key) post(rpc_proxy_http::proxy_web3_rpc_with_key)
.get(rpc_proxy_ws::websocket_handler_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 // authenticated debug route
.route( .route(
"/debug/:rpc_key", "/debug/:rpc_key",
post(rpc_proxy_http::debug_proxy_web3_rpc_with_key) post(rpc_proxy_http::debug_proxy_web3_rpc_with_key)
.get(rpc_proxy_ws::debug_websocket_handler_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 // public fastest
.route( .route(
"/fastest", "/fastest",
post(rpc_proxy_http::fastest_proxy_web3_rpc) post(rpc_proxy_http::fastest_proxy_web3_rpc)
.get(rpc_proxy_ws::fastest_websocket_handler), .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 // authenticated fastest with and without trailing slash
.route( .route(
"/fastest/:rpc_key", "/fastest/:rpc_key",
post(rpc_proxy_http::fastest_proxy_web3_rpc_with_key) post(rpc_proxy_http::fastest_proxy_web3_rpc_with_key)
.get(rpc_proxy_ws::fastest_websocket_handler_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 // public versus
.route( .route(
"/versus", "/versus",
post(rpc_proxy_http::versus_proxy_web3_rpc).get(rpc_proxy_ws::versus_websocket_handler), 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 // authenticated versus
.route( .route(
"/versus/:rpc_key", "/versus/:rpc_key",
post(rpc_proxy_http::versus_proxy_web3_rpc_with_key) post(rpc_proxy_http::versus_proxy_web3_rpc_with_key)
.get(rpc_proxy_ws::versus_websocket_handler_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 // System things
// //