diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-01-29 02:01:15 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-01-29 02:01:15 +0800 |
commit | 21fd31dad8bc6e0291ca405314b516670333c707 (patch) | |
tree | 34aa6f6d0e1f5c7316f0220f6e0569f916307fa3 /rpc/http | |
parent | a88f609b8ab1e20eb2564d47605985d6b8f593e8 (diff) | |
parent | 872b2497114209119becf2e8a4d4a5818e2084ee (diff) | |
download | go-tangerine-21fd31dad8bc6e0291ca405314b516670333c707.tar go-tangerine-21fd31dad8bc6e0291ca405314b516670333c707.tar.gz go-tangerine-21fd31dad8bc6e0291ca405314b516670333c707.tar.bz2 go-tangerine-21fd31dad8bc6e0291ca405314b516670333c707.tar.lz go-tangerine-21fd31dad8bc6e0291ca405314b516670333c707.tar.xz go-tangerine-21fd31dad8bc6e0291ca405314b516670333c707.tar.zst go-tangerine-21fd31dad8bc6e0291ca405314b516670333c707.zip |
Merge branch 'jsonrpc' of github.com:ethereum/go-ethereum into jsonrpc
Diffstat (limited to 'rpc/http')
-rw-r--r-- | rpc/http/server.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rpc/http/server.go b/rpc/http/server.go index 93b52a634..965727a4e 100644 --- a/rpc/http/server.go +++ b/rpc/http/server.go @@ -29,7 +29,7 @@ import ( var rpchttplogger = logger.NewLogger("RPC-HTTP") var JSON rpc.JsonWrapper -func NewRpcHttpServer(pipe *xeth.JSXEth, port int) (*RpcHttpServer, error) { +func NewRpcHttpServer(pipe *xeth.XEth, port int) (*RpcHttpServer, error) { sport := fmt.Sprintf(":%d", port) l, err := net.Listen("tcp", sport) if err != nil { @@ -47,7 +47,7 @@ func NewRpcHttpServer(pipe *xeth.JSXEth, port int) (*RpcHttpServer, error) { type RpcHttpServer struct { quit chan bool listener net.Listener - pipe *xeth.JSXEth + pipe *xeth.XEth port int } @@ -85,6 +85,8 @@ func (s *RpcHttpServer) Start() { func (s *RpcHttpServer) apiHandler(api *rpc.EthereumApi) http.Handler { fn := func(w http.ResponseWriter, req *http.Request) { + w.Header().Set("Access-Control-Allow-Origin", "*") + rpchttplogger.Debugln("Handling request") reqParsed, reqerr := JSON.ParseRequestBody(req) |