Skip to content

Commit c54df3f

Browse files
committed
chore: Prevent unauth users from being able to filter - this is a feature gated request with the permanent location in node-reth
1 parent acb69a9 commit c54df3f

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

crates/websocket-proxy/src/server.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ impl Server {
7373
.route("/ws/{api_key}/filter", any(authenticated_filter_websocket_handler));
7474
} else {
7575
info!("Public endpoint is enabled");
76-
router = router
77-
.route("/ws", any(unauthenticated_websocket_handler))
78-
.route("/ws/filter", any(unauthenticated_filter_websocket_handler));
76+
router = router.route("/ws", any(unauthenticated_websocket_handler));
7977
}
8078

8179
let router = router.with_state(ServerState {
@@ -209,17 +207,6 @@ async fn unauthenticated_websocket_handler(
209207
websocket_handler(state, ws, addr, headers, FilterType::None)
210208
}
211209

212-
async fn unauthenticated_filter_websocket_handler(
213-
State(state): State<ServerState>,
214-
ws: WebSocketUpgrade,
215-
ConnectInfo(addr): ConnectInfo<SocketAddr>,
216-
headers: HeaderMap,
217-
query: Query<FilterQuery>,
218-
) -> impl IntoResponse {
219-
let filter = create_filter_from_query(query.0);
220-
websocket_handler(state, ws, addr, headers, filter)
221-
}
222-
223210
fn websocket_handler(
224211
state: ServerState,
225212
ws: WebSocketUpgrade,

0 commit comments

Comments
 (0)