Browse Source

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

pull/1596/head
fatedier 5 years ago
parent
commit
52ecd84d8a
  1. 1
      models/config/proxy.go

1
models/config/proxy.go

@ -218,6 +218,7 @@ func (cfg *BaseProxyConf) UnmarshalFromIni(prefix string, name string, section i
cfg.HealthCheckUrl = s + cfg.HealthCheckUrl cfg.HealthCheckUrl = s + cfg.HealthCheckUrl
} }
cfg.Metas = make(map[string]string)
for k, v := range section { for k, v := range section {
if strings.HasPrefix(k, "meta_") { if strings.HasPrefix(k, "meta_") {
cfg.Metas[strings.TrimPrefix(k, "meta_")] = v cfg.Metas[strings.TrimPrefix(k, "meta_")] = v

Loading…
Cancel
Save