class HostValidatorService implements ApplicationListener<ContextRefreshedEvent> {

    public boolean isRequestFromAdmin(final ServletRequest request) {
        String host = ipAddressResolver.resolveToHostName(request.getRemoteAddr());
        return !wilmaAdminHostsDTO.isSecurityEnabled() || allowedHosts.contains(host);
    }

}