Trait/Object

play.filters.csp

CSPActionBuilder

Related Docs: object CSPActionBuilder | package csp

Permalink

trait CSPActionBuilder extends ActionBuilder[Request, AnyContent]

This trait is used to give a CSP header to the result for a single action.

To use this in a controller, add something like the following:

class CSPActionController @Inject()(cspAction: CSPActionBuilder, cc: ControllerComponents)
 extends AbstractController(cc) {
  def index = cspAction { implicit request =>
    Ok("result containing CSP")
  }
}
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CSPActionBuilder
  2. ActionBuilder
  3. ActionFunction
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def cspResultProcessor: CSPResultProcessor

    Permalink
    Attributes
    protected
  2. abstract def executionContext: ExecutionContext

    Permalink
    Attributes
    protected
    Definition Classes
    ActionFunction
  3. abstract def mat: Materializer

    Permalink
    Attributes
    protected
  4. abstract def parser: BodyParser[AnyContent]

    Permalink
    Definition Classes
    ActionBuilder

Concrete 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. def andThen[Q[_]](other: ActionFunction[Request, Q]): ActionBuilder[Q, AnyContent]

    Permalink
    Definition Classes
    ActionBuilder → ActionFunction
  5. final def apply(block: ⇒ Result): Action[AnyContent]

    Permalink
    Definition Classes
    ActionBuilder
  6. final def apply(block: (Request[AnyContent]) ⇒ Result): Action[AnyContent]

    Permalink
    Definition Classes
    ActionBuilder
  7. final def apply[A](bodyParser: BodyParser[A]): ActionBuilder[Request, A]

    Permalink
    Definition Classes
    ActionBuilder
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. final def async[A](bodyParser: BodyParser[A])(block: (Request[A]) ⇒ Future[Result]): Action[A]

    Permalink
    Definition Classes
    ActionBuilder
  10. final def async(block: (Request[AnyContent]) ⇒ Future[Result]): Action[AnyContent]

    Permalink
    Definition Classes
    ActionBuilder
  11. final def async(block: ⇒ Future[Result]): Action[AnyContent]

    Permalink
    Definition Classes
    ActionBuilder
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def compose[B](other: ActionBuilder[Request, B]): ActionBuilder[Request, B]

    Permalink
    Definition Classes
    ActionFunction
  14. def compose[Q[_]](other: ActionFunction[Q, Request]): ActionFunction[Q, Request]

    Permalink
    Definition Classes
    ActionFunction
  15. def composeAction[A](action: Action[A]): Action[A]

    Permalink
    Attributes
    protected
    Definition Classes
    ActionBuilder
  16. def composeParser[A](bodyParser: BodyParser[A]): BodyParser[A]

    Permalink
    Attributes
    protected
    Definition Classes
    ActionBuilder
  17. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. def invokeBlock[A](request: Request[A], block: (Request[A]) ⇒ Future[Result]): Future[Result]

    Permalink
    Definition Classes
    CSPActionBuilder → ActionFunction
  23. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  27. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

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

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

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

Inherited from ActionBuilder[Request, AnyContent]

Inherited from ActionFunction[Request, Request]

Inherited from AnyRef

Inherited from Any

Ungrouped