aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2020-06-07 17:56:50 -0400
committerDeterminant <tederminant@gmail.com>2020-06-07 17:56:50 -0400
commit7661fa34f0682b326b336b026c8624e5e51166b8 (patch)
tree776515b195e7d69cad4fc39507f64209658e183d
parent734e7686a684030e2b9f1179af7f560683f2e913 (diff)
add ipFilter to "static" RPC
-rw-r--r--plugin/evm/vm.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index 10a4854..fc4c971 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -366,8 +366,8 @@ func (vm *VM) CreateStaticHandlers() map[string]*commonEng.HTTPHandler {
handler := rpc.NewServer()
handler.RegisterName("static", &StaticService{})
return map[string]*commonEng.HTTPHandler{
- "/rpc": &commonEng.HTTPHandler{LockOptions: commonEng.NoLock, Handler: handler},
- "/ws": &commonEng.HTTPHandler{LockOptions: commonEng.NoLock, Handler: handler.WebsocketHandler([]string{"*"})},
+ "/rpc": &commonEng.HTTPHandler{LockOptions: commonEng.NoLock, Handler: newIPFilter(handler)},
+ "/ws": &commonEng.HTTPHandler{LockOptions: commonEng.NoLock, Handler: newIPFilter(handler.WebsocketHandler([]string{"*"}))},
}
}