rpc: add CORS workaround for RPC
This one enables our RPC to be called from the browser if there is a need. It's insecure and not standards-compliant, thus this behaviour is configurable is not enabled by default. It makes our node with this workaround enabled compatible with neo-mon monitoring. Originally debugged by @anatoly-bogatyrev in #464.
This commit is contained in:
parent
e5205d26a3
commit
b46dd295bc
14 changed files with 72 additions and 22 deletions
|
@ -247,7 +247,7 @@ func startServer(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
server := network.NewServer(serverConfig, chain)
|
||||
rpcServer := rpc.NewServer(chain, cfg.ApplicationConfiguration.RPCPort, server)
|
||||
rpcServer := rpc.NewServer(chain, cfg.ApplicationConfiguration.RPC, server)
|
||||
errChan := make(chan error)
|
||||
monitoring := metrics.NewMetricsService(cfg.ApplicationConfiguration.Monitoring)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue