Package org.apache.wicket.csp
Class CSPNonceHeaderResponseDecorator
- java.lang.Object
-
- org.apache.wicket.markup.html.DecoratingHeaderResponse
-
- org.apache.wicket.csp.CSPNonceHeaderResponseDecorator
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,IHeaderResponse
public class CSPNonceHeaderResponseDecorator extends DecoratingHeaderResponse
Add a Content Security Policy (CSP) nonce to allAbstractCspHeaderItem
s when that is required by the configuration of the CSP.
-
-
Constructor Summary
Constructors Constructor Description CSPNonceHeaderResponseDecorator(IHeaderResponse real, ContentSecurityPolicySettings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
render(HeaderItem item)
Renders the givenHeaderItem
to the response if none of its tokens has been rendered before.-
Methods inherited from class org.apache.wicket.markup.html.DecoratingHeaderResponse
close, getRealResponse, getResponse, isClosed, markRendered, wasRendered
-
-
-
-
Constructor Detail
-
CSPNonceHeaderResponseDecorator
public CSPNonceHeaderResponseDecorator(IHeaderResponse real, ContentSecurityPolicySettings settings)
-
-
Method Detail
-
render
public void render(HeaderItem item)
Description copied from interface:IHeaderResponse
Renders the givenHeaderItem
to the response if none of its tokens has been rendered before.Automatically marks all item's tokens as rendered.
- Specified by:
render
in interfaceIHeaderResponse
- Overrides:
render
in classDecoratingHeaderResponse
- Parameters:
item
- The item to render.- See Also:
IHeaderResponse.markRendered(Object)
-
-