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
- Alphabetic
- By Inheritance
- DefaultCSPProcessor
- CSPProcessor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val cspLine: String
- Attributes
- protected
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def generateContentSecurityPolicyNonce(maybeRequest: Option[RequestHeader]): String
- Attributes
- protected
- def generateDirectives(directives: Seq[CSPDirective]): String
- Attributes
- protected
- def generateLine(nonce: Option[String]): String
- Attributes
- protected
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val hashPatterns: Seq[(Pattern, String)]
- Attributes
- protected
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val noncePattern: Pattern
- Attributes
- protected
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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
- DefaultCSPProcessor → CSPProcessor
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()