Merge pull request #32 from p2p-org/fix_upstream_chain_matcher
fix chain matcher
This commit is contained in:
@@ -110,7 +110,7 @@ open class ConfiguredUpstreams(
|
|||||||
|
|
||||||
fun hasMatchingUpstream(chain: Chain, matcher: Selector.LabelSelectorMatcher): Boolean =
|
fun hasMatchingUpstream(chain: Chain, matcher: Selector.LabelSelectorMatcher): Boolean =
|
||||||
config.upstreams.any { up ->
|
config.upstreams.any { up ->
|
||||||
up.chain?.equals(chain.chainName, ignoreCase = true) ?: true && matcher.matches(up.labels)
|
(up.chain?.let { Global.chainById(it) == chain } ?: true) && matcher.matches(up.labels)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun buildDefaultOptions(config: UpstreamsConfig): HashMap<Chain, UpstreamsConfig.Options> {
|
private fun buildDefaultOptions(config: UpstreamsConfig): HashMap<Chain, UpstreamsConfig.Options> {
|
||||||
|
|||||||
Reference in New Issue
Block a user