diff --git a/discovery-provider/nginx_conf/main.lua b/discovery-provider/nginx_conf/main.lua index 428f86d7e38..74526f0279c 100644 --- a/discovery-provider/nginx_conf/main.lua +++ b/discovery-provider/nginx_conf/main.lua @@ -258,12 +258,13 @@ function _M.mark_request_processed () end function _M.validate_nethermind_rpc_request () - if ngx.req.get_method() == "GET" then + if ngx.req.get_method() == "GET" or ngx.req.get_method() == "OPTIONS" then return end ngx.req.read_body() local body = cjson.decode(ngx.req.get_body_data()) - if not utils.starts_with(body.method, "eth_") then + is_bad = utils.starts_with(body.method, "clique_") + if is_bad then ngx.exit(405) end end