diff --git a/client/proxy/ProxyRouter.go b/client/proxy/ProxyRouter.go index 545941fcbe..fa0fce8cb4 100644 --- a/client/proxy/ProxyRouter.go +++ b/client/proxy/ProxyRouter.go @@ -22,7 +22,7 @@ type ProxyConnection struct { } type Config struct { - ProxyServiceConfig string `env:"PROXY_SERVICE_CONFIG" envDefault:""` + ProxyServiceConfig string `env:"PROXY_SERVICE_CONFIG" envDefault:"{}"` } func GetProxyConfig() (*Config, error) { @@ -57,9 +57,9 @@ func NewProxyRouterImpl(logger *zap.SugaredLogger, proxyCfg *Config, enforcer ca proxy := make(map[string]func(writer http.ResponseWriter, request *http.Request)) for s, connection := range proxyConnection { proxy[s], err = NewHTTPReverseProxy(fmt.Sprintf("http://%s:%s", connection.Host, connection.Port), client.Transport, enforcer) - } - if err != nil { - return nil, err + if err != nil { + return nil, err + } } router := &ProxyRouterImpl{