class HostBasedUrlAccessSecurityFilter implements Filter {

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        if (hostValidatorService.isRequestFromAdmin(request)) {
            chain.doFilter(request, response);
        } else {
            if (request instanceof HttpServletRequest) {
                logger.info(urlAccessLogMessageAssembler.assembleDenyMessage((HttpServletRequest) request));
            }
            sendBackNoAccessResponse(response);
        }
    }

}