Merge pull request #32 from p2p-org/fix_upstream_chain_matcher

fix chain matcher
This commit is contained in:
Vyacheslav Shebanov
2022-10-18 19:33:42 +03:00
committed by GitHub

View File

@@ -110,7 +110,7 @@ open class ConfiguredUpstreams(
fun hasMatchingUpstream(chain: Chain, matcher: Selector.LabelSelectorMatcher): Boolean =
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> {