diff options
author | zelig <viktor.tron@gmail.com> | 2015-04-22 21:55:01 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-04-24 19:45:11 +0800 |
commit | 6b1b5a4a2a8b315f4d0e7a08ab10563653711a92 (patch) | |
tree | 697ed17f77ce843ce0086e9532a2ee2d992a906d /cmd/geth/admin.go | |
parent | 1b7c017076ae578a89a18b5c7ffc61e9c8d59eee (diff) | |
download | go-tangerine-6b1b5a4a2a8b315f4d0e7a08ab10563653711a92.tar go-tangerine-6b1b5a4a2a8b315f4d0e7a08ab10563653711a92.tar.gz go-tangerine-6b1b5a4a2a8b315f4d0e7a08ab10563653711a92.tar.bz2 go-tangerine-6b1b5a4a2a8b315f4d0e7a08ab10563653711a92.tar.lz go-tangerine-6b1b5a4a2a8b315f4d0e7a08ab10563653711a92.tar.xz go-tangerine-6b1b5a4a2a8b315f4d0e7a08ab10563653711a92.tar.zst go-tangerine-6b1b5a4a2a8b315f4d0e7a08ab10563653711a92.zip |
cli/js console: if corsDomain is not given to startRpc, we fall back to value set on command line with `-corsDomain`
Diffstat (limited to 'cmd/geth/admin.go')
-rw-r--r-- | cmd/geth/admin.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go index 646b45bf9..31f8d4400 100644 --- a/cmd/geth/admin.go +++ b/cmd/geth/admin.go @@ -203,13 +203,14 @@ func (js *jsre) startRPC(call otto.FunctionCall) otto.Value { fmt.Println(err) return otto.FalseValue() } + port, err := call.Argument(1).ToInteger() if err != nil { fmt.Println(err) return otto.FalseValue() } - var corsDomain string + corsDomain := js.corsDomain if len(call.ArgumentList) > 2 { corsDomain, err = call.Argument(2).ToString() if err != nil { |