Class

com.twitter.finagle.http.filter.Cors

HttpFilter

Related Doc: package Cors

Permalink

class HttpFilter extends Filter[Request, Response, Request, Response]

An HTTP filter that handles preflight (OPTIONS) requests and sets CORS response headers as described in the W3C CORS spec.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HttpFilter
  2. Filter
  3. Function2
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HttpFilter(policy: Policy)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Preflight

    Permalink
    Attributes
    protected[this]
  5. def addExposedHeaders(response: Response): Response

    Permalink

    If the list of exposed headers is not empty add one or more Access-Control-Expose- Headers headers, with as values the header field names given in the list of exposed headers.

    If the list of exposed headers is not empty add one or more Access-Control-Expose- Headers headers, with as values the header field names given in the list of exposed headers.

    By not adding the appropriate headers resource can also clear the preflight result cache of all entries where origin is a case-sensitive match for the value of the Origin header and url is a case-sensitive match for the URL of the resource.

    Attributes
    protected[this]
  6. def agnosticAndThen(next: TypeAgnostic): Filter[Request, Response, Request, Response]

    Permalink
    Definition Classes
    Filter
  7. def andThen(factory: ServiceFactory[Request, Response]): ServiceFactory[Request, Response]

    Permalink
    Definition Classes
    Filter
  8. def andThen(service: Service[Request, Response]): Service[Request, Response]

    Permalink
    Definition Classes
    Filter
  9. def andThen[Req2, Rep2](next: Filter[Request, Response, Req2, Rep2]): Filter[Request, Response, Req2, Rep2]

    Permalink
    Definition Classes
    Filter
  10. def andThenIf[Req2 >: Request, Rep2 <: Response](condAndFilter: (Boolean, Filter[Request, Response, Req2, Rep2])): Filter[Request, Response, Req2, Rep2]

    Permalink
    Definition Classes
    Filter
  11. def andThenIf[Req2 >: Request, Rep2 <: Response](conditional: Boolean, filter: Filter[Request, Response, Req2, Rep2]): Filter[Request, Response, Req2, Rep2]

    Permalink
    Definition Classes
    Filter
  12. def apply(request: Request, service: Service[Request, Response]): Future[Response]

    Permalink

    Fully handle preflight requests.

    Fully handle preflight requests. If a preflight request is deemed to be unacceptable, a 200 OK response is served without CORS headers.

    Adds CORS response headers onto all non-preflight requests that have the 'Origin' header set to a value that is allowed by the Policy.

    Definition Classes
    HttpFilter → Filter → Function2
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def curried: (Request) ⇒ (Service[Request, Response]) ⇒ Future[Response]

    Permalink
    Definition Classes
    Function2
    Annotations
    @unspecialized()
  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def getHeaders(request: Request): Seq[String]

    Permalink

    Let header field-names be the values as result of parsing the Access-Control-Request-Headers headers.

    Let header field-names be the values as result of parsing the Access-Control-Request-Headers headers. If there are no Access-Control-Request-Headers headers let header field-names be the empty list.

    Attributes
    protected[this]
  21. def getMethod(request: Request): Option[String]

    Permalink

    Let method be the value as result of parsing the Access-Control-Request-Method header.

    Let method be the value as result of parsing the Access-Control-Request-Method header.

    Attributes
    protected[this]
  22. def getOrigin(request: Request): Option[String]

    Permalink
    Attributes
    protected[this]
  23. def handlePreflight(request: Request): Option[Response]

    Permalink

    https://www.w3.org/TR/cors/#resource-preflight-requests

    https://www.w3.org/TR/cors/#resource-preflight-requests

    Attributes
    protected[this]
  24. def handleSimple(request: Request, response: Response): Response

    Permalink

    https://www.w3.org/TR/cors/#resource-requests

    https://www.w3.org/TR/cors/#resource-requests

    Attributes
    protected[this]
  25. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. def setVary(response: Response): Response

    Permalink

    Resources that wish to enable themselves to be shared with multiple Origins but do not respond uniformly with "*" must in practice generate the Access-Control-Allow-Origin header dynamically in response to every request they wish to allow.

    Resources that wish to enable themselves to be shared with multiple Origins but do not respond uniformly with "*" must in practice generate the Access-Control-Allow-Origin header dynamically in response to every request they wish to allow. As a consequence, authors of such resources should send a Vary: Origin HTTP header or provide other appropriate control directives to prevent caching of such responses, which may be inaccurate if re-used across- origins.

  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink
    Definition Classes
    Filter → Function2 → AnyRef → Any
  33. def tupled: ((Request, Service[Request, Response])) ⇒ Future[Response]

    Permalink
    Definition Classes
    Function2
    Annotations
    @unspecialized()
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Filter[Request, Response, Request, Response]

Inherited from (Request, Service[Request, Response]) ⇒ Future[Response]

Inherited from AnyRef

Inherited from Any

Ungrouped