- All Known Implementing Classes:
ClonedCSPValue
,CSPDirectiveSandboxValue
,CSPDirectiveSrcValue
,FixedCSPValue
,RelativeURICSPValue
public interface CSPRenderable
CSPRenderable
describes a directive that is part of a Content-Security-Policy (CSP in
short). Most directives are predefined in enums.- Author:
- papegaaij
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Checks if theCSPRenderable
represents a valid value for a-src
directive.render
(ContentSecurityPolicySettings settings, RequestCycle cycle) Renders the value that should be put in the CSP header.
-
Method Details
-
render
Renders the value that should be put in the CSP header.- Parameters:
settings
- TheContentSecurityPolicySettings
that renders this value.cycle
- The currentRequestCycle
.- Returns:
- The rendered value.
-
checkValidityForSrc
Checks if theCSPRenderable
represents a valid value for a-src
directive. By default no checks are performed.- Throws:
IllegalStateException
- when thisCSPRenderable
represents an invalid value.
-