Package org.apache.wicket.csp
Interface CSPRenderable
-
- 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:
CSPDirectiveSrcValue
,CSPDirectiveSandboxValue
,FixedCSPValue
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
checkValidityForSrc()
Checks if theCSPRenderable
represents a valid value for a-src
directive.String
render(ContentSecurityPolicySettings settings, RequestCycle cycle)
Renders the value that should be put in the CSP header.
-
-
-
Method Detail
-
render
String render(ContentSecurityPolicySettings settings, RequestCycle cycle)
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
default void 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.
-
-