aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-18 23:49:35 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-18 23:49:35 +0800
commita3a5f8b59342363613f46af3413a2e5a8c124da8 (patch)
tree2b0ec26182a473e3eccc07b1fd8ee131bf617505
parent677796b3517782dd530b7a1a7d9dfd16b643404c (diff)
parenta2598e649de8b41727084749527aa0bc27965856 (diff)
downloadgo-tangerine-a3a5f8b59342363613f46af3413a2e5a8c124da8.tar
go-tangerine-a3a5f8b59342363613f46af3413a2e5a8c124da8.tar.gz
go-tangerine-a3a5f8b59342363613f46af3413a2e5a8c124da8.tar.bz2
go-tangerine-a3a5f8b59342363613f46af3413a2e5a8c124da8.tar.lz
go-tangerine-a3a5f8b59342363613f46af3413a2e5a8c124da8.tar.xz
go-tangerine-a3a5f8b59342363613f46af3413a2e5a8c124da8.tar.zst
go-tangerine-a3a5f8b59342363613f46af3413a2e5a8c124da8.zip
Merge pull request #1032 from tgerring/issue1025
Multiple CORS domains support
-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)