Class HttpOriginMatcher

java.lang.Object
org.apache.pekko.http.cors.javadsl.model.HttpOriginMatcher
org.apache.pekko.http.cors.scaladsl.model.HttpOriginMatcher
Direct Known Subclasses:
HttpOriginMatcher.$times$, HttpOriginMatcher.Default, HttpOriginMatcher.Strict

public abstract class HttpOriginMatcher extends HttpOriginMatcher
HttpOrigin matcher.
  • Constructor Details

    • HttpOriginMatcher

      public HttpOriginMatcher()
  • Method Details

    • strict

      public static HttpOriginMatcher strict(scala.collection.immutable.Seq<HttpOrigin> origins)
      Build a matcher that will accept any of the given origins. Wildcard in the hostname will not be interpreted.
      Parameters:
      origins - (undocumented)
      Returns:
      (undocumented)
    • apply

      public static HttpOriginMatcher apply(scala.collection.immutable.Seq<HttpOrigin> origins)
      Build a matcher that will accept any of the given origins. Hostname starting with *. will match any sub-domain. The scheme and the port are always strictly matched.
      Parameters:
      origins - (undocumented)
      Returns:
      (undocumented)
    • matches

      public abstract boolean matches(HttpOrigin origin)
    • matches

      public boolean matches(HttpOrigin origin)
      Java API
      Specified by:
      matches in class HttpOriginMatcher