code: @SuppressWarnings("null")
    private boolean accepts(SlingHttpServletRequest request) {
      return request.getMethod().equalsIgnoreCase(METHOD_GET)
          && request.getResource() != null
          && StringUtils.equals(request.getResource().getValueMap().get(JCR_PRIMARYTYPE, String.class), NT_FILE);
    }
docs: This filter only processes GET requests that targets a nt:file resource.
  @param request
  @return true if the filter accepts the given request