Class

play.filters.csp

DefaultCSPProcessor

Related Doc: package csp

Permalink

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)

    Permalink

    config

    the CSPConfig to use for processing rules.

    Annotations
    @Inject()

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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val cspLine: String

    Permalink
    Attributes
    protected
  7. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def generateContentSecurityPolicyNonce(maybeRequest: Option[RequestHeader]): String

    Permalink
    Attributes
    protected
  11. def generateDirectives(directives: Seq[CSPDirective]): String

    Permalink
    Attributes
    protected
  12. def generateLine(nonce: Option[String]): String

    Permalink
    Attributes
    protected
  13. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. val hashPatterns: Seq[(Pattern, String)]

    Permalink
    Attributes
    protected
  16. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  18. val noncePattern: Pattern

    Permalink
    Attributes
    protected
  19. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  21. def process(requestHeader: RequestHeader): Option[CSPResult]

    Permalink

    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

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

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

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

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

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

Inherited from CSPProcessor

Inherited from AnyRef

Inherited from Any

Ungrouped