Skip to content
Snippets Groups Projects
Commit b81af4ee authored by willson-chen's avatar willson-chen
Browse files

Add ANYHOST_KEY judgment

parent ed294ed3
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,7 @@ const ( ...@@ -57,6 +57,7 @@ const (
const ( const (
ANY_VALUE = "*" ANY_VALUE = "*"
ANYHOST_KEY = "anyhost"
ANYHOST_VALUE = "0.0.0.0" ANYHOST_VALUE = "0.0.0.0"
REMOVE_VALUE_PREFIX = "-" REMOVE_VALUE_PREFIX = "-"
) )
......
...@@ -100,7 +100,13 @@ func ToConfigurators(urls []*common.URL, f func(url *common.URL) config_center.C ...@@ -100,7 +100,13 @@ func ToConfigurators(urls []*common.URL, f func(url *common.URL) config_center.C
configurators = []config_center.Configurator{} configurators = []config_center.Configurator{}
break break
} }
//TODO:anyhost_key judage
var override map[string][]string = url.GetParams()
delete(override, constant.ANYHOST_KEY)
if len(override) == 0 {
configurators = configurators[:0]
continue
}
configurators = append(configurators, f(url)) configurators = append(configurators, f(url))
} }
return configurators return configurators
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment