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 newFixedCSPValue
for the given value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.String
toString()
-
-
-
Constructor Detail
-
FixedCSPValue
public FixedCSPValue(String value)
Creates a newFixedCSPValue
for the given value.- Parameters:
value
- the value to render;
-
-
Method Detail
-
render
public String render(ContentSecurityPolicySettings settings, RequestCycle cycle)
Description copied from interface:CSPRenderable
Renders the value that should be put in the CSP header.- Specified by:
render
in interfaceCSPRenderable
- Parameters:
settings
- TheContentSecurityPolicySettings
that renders this value.cycle
- The currentRequestCycle
.- Returns:
- The rendered value.
-
checkValidityForSrc
public void checkValidityForSrc()
Description copied from interface:CSPRenderable
Checks if theCSPRenderable
represents a valid value for a-src
directive. By default no checks are performed.- Specified by:
checkValidityForSrc
in interfaceCSPRenderable
-
-