From bc13b1b4d299e83b4abc967c2a5cc1524b78e673 Mon Sep 17 00:00:00 2001 From: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com> Date: Mon, 2 Aug 2021 17:30:00 +0900 Subject: [PATCH] server: fix viper parse app.toml (#385) --- server/config/toml.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/config/toml.go b/server/config/toml.go index dd185b1b..7312d9bf 100644 --- a/server/config/toml.go +++ b/server/config/toml.go @@ -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 }}"