Package org.apache.wicket.csp
Class FixedCSPValue
- java.lang.Object
-
- org.apache.wicket.csp.FixedCSPValue
-
- All Implemented Interfaces:
CSPRenderable
public class FixedCSPValue extends Object implements CSPRenderable
A simple CSP value that renders the string specified.- Author:
- papegaaij
-
-
Constructor Summary
Constructors Constructor Description FixedCSPValue(String value)Creates a newFixedCSPValuefor the given value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckValidityForSrc()Checks if theCSPRenderablerepresents a valid value for a-srcdirective.Stringrender(ContentSecurityPolicySettings settings, RequestCycle cycle)Renders the value that should be put in the CSP header.StringtoString()
-
-
-
Constructor Detail
-
FixedCSPValue
public FixedCSPValue(String value)
Creates a newFixedCSPValuefor the given value.- Parameters:
value- the value to render;
-
-
Method Detail
-
render
public String render(ContentSecurityPolicySettings settings, RequestCycle cycle)
Description copied from interface:CSPRenderableRenders the value that should be put in the CSP header.- Specified by:
renderin interfaceCSPRenderable- Parameters:
settings- TheContentSecurityPolicySettingsthat renders this value.cycle- The currentRequestCycle.- Returns:
- The rendered value.
-
checkValidityForSrc
public void checkValidityForSrc()
Description copied from interface:CSPRenderableChecks if theCSPRenderablerepresents a valid value for a-srcdirective. By default no checks are performed.- Specified by:
checkValidityForSrcin interfaceCSPRenderable
-
-