config: cors options are arrays of strings, not strings

Fixes #2980
This commit is contained in:
Anton Kaliaev
2018-12-10 12:14:07 +04:00
parent 41eaf0e31d
commit 8862803833
3 changed files with 6 additions and 5 deletions

View File

@@ -21,4 +21,5 @@ Special thanks to external contributors on this release:
### IMPROVEMENTS:
### BUG FIXES:
- [kv indexer] \#2912 don't ignore key when executing CONTAINS
- [kv indexer] \#2912 don't ignore key when executing CONTAINS
- [config] \#2980 fix cors options formatting

View File

@@ -779,7 +779,7 @@ type InstrumentationConfig struct {
// 0 - unlimited.
MaxOpenConnections int `mapstructure:"max_open_connections"`
// Tendermint instrumentation namespace.
// Instrumentation namespace.
Namespace string `mapstructure:"namespace"`
}

View File

@@ -125,13 +125,13 @@ laddr = "{{ .RPC.ListenAddress }}"
# A list of origins a cross-domain request can be executed from
# Default value '[]' disables cors support
# Use '["*"]' to allow any origin
cors_allowed_origins = "{{ .RPC.CORSAllowedOrigins }}"
cors_allowed_origins = [{{ range .RPC.CORSAllowedOrigins }}{{ printf "%q, " . }}{{end}}]
# A list of methods the client is allowed to use with cross-domain requests
cors_allowed_methods = "{{ .RPC.CORSAllowedMethods }}"
cors_allowed_methods = [{{ range .RPC.CORSAllowedMethods }}{{ printf "%q, " . }}{{end}}]
# A list of non simple headers the client is allowed to use with cross-domain requests
cors_allowed_headers = "{{ .RPC.CORSAllowedHeaders }}"
cors_allowed_headers = [{{ range .RPC.CORSAllowedHeaders }}{{ printf "%q, " . }}{{end}}]
# TCP or UNIX socket address for the gRPC server to listen on
# NOTE: This server only supports /broadcast_tx_commit