aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-28 21:02:18 +0800
committerobscuren <geffobscura@gmail.com>2015-01-28 21:02:18 +0800
commitcbf162ca6467b91b897c94c3e2c2fd9769a3e9f0 (patch)
tree84857d4381a219ea6f4d28e5e5921e081a641336
parent85d20cd61b3914424c4fe8a980471b55a92f3651 (diff)
downloadgo-tangerine-cbf162ca6467b91b897c94c3e2c2fd9769a3e9f0.tar
go-tangerine-cbf162ca6467b91b897c94c3e2c2fd9769a3e9f0.tar.gz
go-tangerine-cbf162ca6467b91b897c94c3e2c2fd9769a3e9f0.tar.bz2
go-tangerine-cbf162ca6467b91b897c94c3e2c2fd9769a3e9f0.tar.lz
go-tangerine-cbf162ca6467b91b897c94c3e2c2fd9769a3e9f0.tar.xz
go-tangerine-cbf162ca6467b91b897c94c3e2c2fd9769a3e9f0.tar.zst
go-tangerine-cbf162ca6467b91b897c94c3e2c2fd9769a3e9f0.zip
Allow CORS *
-rw-r--r--rpc/server.go2
1 files changed, 2 insertions, 0 deletions
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)