server: fix viper parse app.toml (#385)

This commit is contained in:
Thomas Nguy 2021-08-02 17:30:00 +09:00 committed by GitHub
parent 9b9c835266
commit bc13b1b4d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,8 @@ address = "{{ .EVMRPC.RPCAddress }}"
ws-address = "{{ .EVMRPC.WsAddress }}"
# API defines a list of JSON-RPC namespaces that should be enabled
api = "{{ .EVMRPC.API }}"
# Example: "eth,txpool,personal,net,debug,web3"
api = "{{range $index, $elmt := .EVMRPC.API}}{{if $index}},{{$elmt}}{{else}}{{$elmt}}{{end}}{{end}}"
# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk)
enable-unsafe-cors = "{{ .EVMRPC.EnableUnsafeCORS }}"