From cbf162ca6467b91b897c94c3e2c2fd9769a3e9f0 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 28 Jan 2015 14:02:18 +0100 Subject: [PATCH] Allow CORS * --- rpc/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpc/server.go b/rpc/server.go index a4cf1aa7c..9061c33ef 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -80,6 +80,8 @@ func NewJsonRpcServer(pipe *xeth.JSXEth, port int) (*JsonRpcServer, error) { func apiHandler(xeth *EthereumApi) http.Handler { fn := func(w http.ResponseWriter, req *http.Request) { + w.Header().Set("Access-Control-Allow-Origin", "*") + jsonlogger.Debugln("Handling request") reqParsed, reqerr := JSON.ParseRequestBody(req)