trait HostDirectives extends AnyRef

Source
HostDirectives.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. HostDirectives
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Host directives

  1. def extractHost: Directive1[String]

    Extracts the hostname part of the Host request header value.

  2. def host(regex: Regex): Directive1[String]

    Rejects all requests with a host name that doesn't have a prefix matching the given regular expression.

    Rejects all requests with a host name that doesn't have a prefix matching the given regular expression. For all matching requests the prefix string matching the regex is extracted and passed to the inner route. If the regex contains a capturing group only the string matched by this group is extracted. If the regex contains more than one capturing group an IllegalArgumentException is thrown.

  3. def host(predicate: (String) => Boolean): Directive0

    Rejects all requests for whose host name the given predicate function returns false.

  4. def host(hostNames: String*): Directive0

    Rejects all requests with a host name different from the given ones.