boolean pathMatches(String open, String rule) {
		if ("/".equals(rule)) {
			return true;
		}

		if (rule.endsWith("/")) {
			rule = rule.substring(0, rule.length() - 1);
		}

		String[] openSegments = open.split("/");
		String[] ruleSegments = rule.split("/");
		for (int i = 0; i < ruleSegments.length; i++) {
			if (openSegments.length - 1 < i || !ruleSegments[i].equals(openSegments[i])) {
				return false;
			}
		}

		return true;
	}
Check whether a URL like https://www.microsoft.com matches the list of
trusted sources.

- Schemes must match - There's no subdomain matching. For example
https://jbang.dev doesn't match https://www.jbang.dev - Star matches all
subdomains. For example https://*.jbang.dev matches https://www.jbang.dev and
https://foo.bar.jbangdev.com
src/main/java/dev/jbang/net/TrustedSources.java