fix panic if set meta in proxy config, fix #1595

This commit is contained in:
fatedier 2020-01-06 15:43:25 +08:00
parent 42014eea23
commit 52ecd84d8a
1 changed files with 1 additions and 0 deletions

View File

@ -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