java.lang.Object
org.apache.wicket.csp.CSPRequestCycleListener
- All Implemented Interfaces:
IRequestCycleListener
An
IRequestCycleListener
that adds Content-Security-Policy
and/or
Content-Security-Policy-Report-Only
headers based on the supplied configuration.- Author:
- Sven Haster, Emond Papegaaij
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
mustProtect
(IRequestHandler handler) Must the given handler be protected.void
onRequestHandlerExecuted
(RequestCycle cycle, IRequestHandler handler) Called after anIRequestHandler
has been executed.void
onRequestHandlerResolved
(RequestCycle cycle, IRequestHandler handler) Called when anIRequestHandler
is resolved and will be executed.protected void
protect
(RequestCycle cycle, IRequestHandler handler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.request.cycle.IRequestCycleListener
onBeginRequest, onDetach, onEndRequest, onException, onExceptionRequestHandlerResolved, onRequestHandlerScheduled, onUrlMapped
-
Constructor Details
-
CSPRequestCycleListener
-
-
Method Details
-
onRequestHandlerResolved
Description copied from interface:IRequestCycleListener
Called when anIRequestHandler
is resolved and will be executed.- Specified by:
onRequestHandlerResolved
in interfaceIRequestCycleListener
-
onRequestHandlerExecuted
Description copied from interface:IRequestCycleListener
Called after anIRequestHandler
has been executed. If the execution resulted in an exception this method will not be called for that particularIRequestHandler
.- Specified by:
onRequestHandlerExecuted
in interfaceIRequestCycleListener
-
protect
-
mustProtect
Must the given handler be protected.- Parameters:
handler
- handler- Returns:
true
if must be protected- See Also:
-