@Test public void hostIsInAllowlist_shouldBeFalseIfNotInList() { assertThat(hostIsInAllowlist(List.of("A", "B"), "C")).isFalse(); assertThat(hostIsInAllowlist(List.of("A", "B"), "AA")).isFalse(); assertThat(hostIsInAllowlist(List.of("A.B.C", "B"), "A")).isFalse(); }
static boolean hostIsInAllowlist(final List<String> allowlist, final String hostHeader) { return allowlist.stream() .anyMatch(allowlistEntry -> allowlistEntry.toLowerCase().equals(hostHeader.toLowerCase())); }
HostAllowlistUtils { static boolean hostIsInAllowlist(final List<String> allowlist, final String hostHeader) { return allowlist.stream() .anyMatch(allowlistEntry -> allowlistEntry.toLowerCase().equals(hostHeader.toLowerCase())); } }
HostAllowlistUtils { static boolean hostIsInAllowlist(final List<String> allowlist, final String hostHeader) { return allowlist.stream() .anyMatch(allowlistEntry -> allowlistEntry.toLowerCase().equals(hostHeader.toLowerCase())); }  }
HostAllowlistUtils { static boolean hostIsInAllowlist(final List<String> allowlist, final String hostHeader) { return allowlist.stream() .anyMatch(allowlistEntry -> allowlistEntry.toLowerCase().equals(hostHeader.toLowerCase())); }   }
HostAllowlistUtils { static boolean hostIsInAllowlist(final List<String> allowlist, final String hostHeader) { return allowlist.stream() .anyMatch(allowlistEntry -> allowlistEntry.toLowerCase().equals(hostHeader.toLowerCase())); }    }