HostMatcher
A builder/container that holds include and exclude HostPatterns.
Excludes always take precedence over includes. If no include patterns are specified, all hosts match (unless explicitly excluded).
Usage with DSL operators:
val matcher = HostMatcher().apply {
+"*.example.com" // include
-"internal.example.com" // exclude
}
matcher.matches("api.example.com") // true
matcher.matches("internal.example.com") // falseContent copied to clipboard