aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/websocket.go
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2016-03-14 16:38:54 +0800
committerBas van Kervel <bas@ethdev.com>2016-04-12 17:02:39 +0800
commitaa9fff3e68b1def0a9a22009c233150bf9ba481f (patch)
tree926c241574d6d80dfe4ffd6d2e447a9f7f84dc8b /rpc/websocket.go
parent7e02105672cda92889a78db864a5701d78f45eb2 (diff)
downloaddexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.tar.gz
dexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.tar.zst
dexon-aa9fff3e68b1def0a9a22009c233150bf9ba481f.zip
rpc: various fixes/enhancements
rpc: be less restrictive on the request id rpc: improved documentation console: upgrade web3.js to version 0.16.0 rpc: cache http connections rpc: rename wsDomains parameter to wsOrigins
Diffstat (limited to 'rpc/websocket.go')
-rw-r--r--rpc/websocket.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/websocket.go b/rpc/websocket.go
index 499eedabe..1303f98db 100644
--- a/rpc/websocket.go
+++ b/rpc/websocket.go
@@ -88,10 +88,10 @@ func wsHandshakeValidator(allowedOrigins []string) func(*websocket.Config, *http
}
// NewWSServer creates a new websocket RPC server around an API provider.
-func NewWSServer(cors string, handler *Server) *http.Server {
+func NewWSServer(allowedOrigins string, handler *Server) *http.Server {
return &http.Server{
Handler: websocket.Server{
- Handshake: wsHandshakeValidator(strings.Split(cors, ",")),
+ Handshake: wsHandshakeValidator(strings.Split(allowedOrigins, ",")),
Handler: func(conn *websocket.Conn) {
handler.ServeCodec(NewJSONCodec(&wsReaderWriterCloser{conn}),
OptionMethodInvocation|OptionSubscriptions)