diff options
author | Determinant <[email protected]> | 2020-06-07 17:56:50 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-06-07 17:56:50 -0400 |
commit | 7661fa34f0682b326b336b026c8624e5e51166b8 (patch) | |
tree | 776515b195e7d69cad4fc39507f64209658e183d /plugin/evm | |
parent | 734e7686a684030e2b9f1179af7f560683f2e913 (diff) |
add ipFilter to "static" RPC
Diffstat (limited to 'plugin/evm')
-rw-r--r-- | plugin/evm/vm.go | 4 |
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{"*"}))}, } } |