Add flag to control CORS header #394

* Disabled on CLI
* http://localhost on Mist
This commit is contained in:
Taylor Gerring
2015-03-29 21:21:14 +02:00
parent e1c6c01b4d
commit 24fc1f073d
3 changed files with 13 additions and 1 deletions

View File

@ -47,12 +47,19 @@ var (
Usage: "absolute path to GUI assets directory",
Value: common.DefaultAssetPath(),
}
rpcCorsFlag = utils.RPCCORSDomainFlag
)
func init() {
// Mist-specific default
if len(rpcCorsFlag.Value) == 0 {
rpcCorsFlag.Value = "http://localhost"
}
app.Action = run
app.Flags = []cli.Flag{
assetPathFlag,
rpcCorsFlag,
utils.BootnodesFlag,
utils.DataDirFlag,