Skip to content

Commit

Permalink
Merge pull request #629 from willson-chen/add_anyhost_key_judgment
Browse files Browse the repository at this point in the history
Add: anyhost key judgment
  • Loading branch information
AlexStocks authored Jul 3, 2020
2 parents b568e86 + cb18057 commit e570147
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/constant/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const (

const (
ANY_VALUE = "*"
ANYHOST_KEY = "anyhost"
ANYHOST_VALUE = "0.0.0.0"
REMOVE_VALUE_PREFIX = "-"
)
Expand Down
7 changes: 6 additions & 1 deletion registry/base_configuration_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ func ToConfigurators(urls []*common.URL, f func(url *common.URL) config_center.C
configurators = []config_center.Configurator{}
break
}
//TODO:anyhost_key judage

override := url.GetParams()
delete(override, constant.ANYHOST_KEY)
if len(override) == 0 {
continue
}
configurators = append(configurators, f(url))
}
return configurators
Expand Down

0 comments on commit e570147

Please sign in to comment.