@Test public void hostIsInAllowlist_shouldBeTrueIfInList() { assertThat(hostIsInAllowlist(List.of("A", "B"), "A")).isTrue(); assertThat(hostIsInAllowlist(List.of("A", "B"), "B")).isTrue(); assertThat(hostIsInAllowlist(List.of("A", "MIXed.CASE"), "miXED.caSE")).isTrue(); }
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())); }    }