Improve firewall logging

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
This commit is contained in:
Ammar Bikic
2020-12-03 09:58:28 +01:00
parent 75d906252e
commit e23f4dae63

View File

@@ -728,8 +728,10 @@ public class SecurityManagedConfiguration {
final StrictHttpFirewall firewall = new StrictHttpFirewall();
if (allowedHostNames != null && !CollectionUtils.isEmpty(allowedHostNames)) {
firewall.setAllowedHostnames(hostName -> allowedHostNames.stream()
.anyMatch(allowedHostName -> allowedHostName.equals(hostName)));
firewall.setAllowedHostnames(hostName -> {
LOG.info("Firewall check host: {}, allowed: {}", hostName, allowedHostNames.contains(hostName));
return allowedHostNames.stream()
.anyMatch(allowedHostName -> allowedHostName.equals(hostName));});
}
return firewall;
}