c

play.filters.csp

DefaultCSPProcessor

class DefaultCSPProcessor extends CSPProcessor

The default CSP processor. This handles processing of a CSP Nonce and hashes into a Content-Security-Policy series of directives, based off the CSPConfig.

If a request has the attribute RequestAttrKey.CSPNonce, then that nonce is used. Otherwise, a nonce is generated from 16 bytes of SecureRandom.

Source
CSPProcessor.scala
Linear Supertypes
CSPProcessor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DefaultCSPProcessor
  2. CSPProcessor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultCSPProcessor(config: CSPConfig)

    config

    the CSPConfig to use for processing rules.

    Annotations
    @Inject()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. val cspLine: String
    Attributes
    protected
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def generateContentSecurityPolicyNonce(maybeRequest: Option[RequestHeader]): String
    Attributes
    protected
  11. def generateDirectives(directives: Seq[CSPDirective]): String
    Attributes
    protected
  12. def generateLine(nonce: Option[String]): String
    Attributes
    protected
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. val hashPatterns: Seq[(Pattern, String)]
    Attributes
    protected
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. val noncePattern: Pattern
    Attributes
    protected
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. def process(requestHeader: RequestHeader): Option[CSPResult]

    Inspects the request header, and returns a CSPResult if the request should be subject to CSP processing.

    Inspects the request header, and returns a CSPResult if the request should be subject to CSP processing.

    If the request header has a CSP Nonce already defined, then the processor will carry the existing nonce through in the result, otherwise a new nonce will be generated.

    requestHeader

    a request header

    returns

    Some(CSPResult) if the processor is enabled for this request, otherwise None

    Definition Classes
    DefaultCSPProcessorCSPProcessor
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from CSPProcessor

Inherited from AnyRef

Inherited from Any

Ungrouped