Skip to content

Commit

Permalink
update allowed method logic for socket
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Aug 6, 2024
1 parent b9f5c8f commit e382d29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/proxy/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ pub(crate) async fn socket_handler(
};
let (payload, signed_message) = socket_payload.into_parts();

if !proxy_route.allowed_rpc_methods.contains(&payload.method) {
if !proxy_route.allowed_rpc_methods.is_empty() &&
!proxy_route.allowed_rpc_methods.contains(&payload.method) {
if let Err(e) = inbound_socket.send("Method not allowed.".into()).await {
tracked_log(
log::Level::Error,
Expand Down

0 comments on commit e382d29

Please sign in to comment.