From 52ecd84d8a634ab30d04926aaa3d5e5eb32781de Mon Sep 17 00:00:00 2001 From: fatedier Date: Mon, 6 Jan 2020 15:43:25 +0800 Subject: [PATCH] fix panic if set meta in proxy config, fix #1595 --- models/config/proxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/models/config/proxy.go b/models/config/proxy.go index 1efaf38a..f4ddba50 100644 --- a/models/config/proxy.go +++ b/models/config/proxy.go @@ -218,6 +218,7 @@ func (cfg *BaseProxyConf) UnmarshalFromIni(prefix string, name string, section i cfg.HealthCheckUrl = s + cfg.HealthCheckUrl } + cfg.Metas = make(map[string]string) for k, v := range section { if strings.HasPrefix(k, "meta_") { cfg.Metas[strings.TrimPrefix(k, "meta_")] = v