fix chain matcher

This commit is contained in:
Maksim Fomenkov
2022-10-18 19:20:05 +03:00
parent 50e8b05fbe
commit 30f1c37901

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> {