aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/http.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-22 00:58:57 +0800
committerobscuren <geffobscura@gmail.com>2015-05-22 00:58:57 +0800
commit2c1c78a6d9e59de1d4cdeb32737d281814d690f7 (patch)
tree05471c7e1862733478b08e18bd7ed9419f7f7297 /rpc/http.go
parent915fc0e581c042a8d4896880d45e680003809254 (diff)
parent3ea9868b656077c38af5ea8590761c3218ce558e (diff)
downloaddexon-2c1c78a6d9e59de1d4cdeb32737d281814d690f7.tar
dexon-2c1c78a6d9e59de1d4cdeb32737d281814d690f7.tar.gz
dexon-2c1c78a6d9e59de1d4cdeb32737d281814d690f7.tar.bz2
dexon-2c1c78a6d9e59de1d4cdeb32737d281814d690f7.tar.lz
dexon-2c1c78a6d9e59de1d4cdeb32737d281814d690f7.tar.xz
dexon-2c1c78a6d9e59de1d4cdeb32737d281814d690f7.tar.zst
dexon-2c1c78a6d9e59de1d4cdeb32737d281814d690f7.zip
Merge branch 'release/0.9.23'
Diffstat (limited to 'rpc/http.go')
-rw-r--r--rpc/http.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/rpc/http.go b/rpc/http.go
index 9b3fa5142..f37e102f5 100644
--- a/rpc/http.go
+++ b/rpc/http.go
@@ -6,6 +6,7 @@ import (
"io"
"io/ioutil"
"net/http"
+ "strings"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
@@ -39,7 +40,7 @@ func Start(pipe *xeth.XEth, config RpcConfig) error {
if len(config.CorsDomain) > 0 {
var opts cors.Options
opts.AllowedMethods = []string{"POST"}
- opts.AllowedOrigins = []string{config.CorsDomain}
+ opts.AllowedOrigins = strings.Split(config.CorsDomain, " ")
c := cors.New(opts)
handler = newStoppableHandler(c.Handler(JSONRPC(pipe)), l.stop)