Class CsrfPreventionFilter.MimePredicate

java.lang.Object
org.apache.catalina.filters.CsrfPreventionFilter.MimePredicate
All Implemented Interfaces:
Predicate<String>
Enclosing class:
CsrfPreventionFilter

protected static class CsrfPreventionFilter.MimePredicate extends Object implements Predicate<String>
A no-nonce Predicate that evaluates a MIME type instead of a URL. It can be used with any other Predicate for matching the actual value of the MIME type.
  • Constructor Details

    • MimePredicate

      public MimePredicate(ServletContext context, Predicate<String> predicate)
      Construct a new MimePredicate.
      Parameters:
      context - The servlet context
      predicate - The delegate predicate for matching MIME types
  • Method Details

    • test

      public boolean test(String t)
      Specified by:
      test in interface Predicate<String>
    • getPredicate

      public Predicate<String> getPredicate()
      Get the delegate predicate.
      Returns:
      The delegate predicate