Package org.apache.wicket.coop
Class CrossOriginOpenerPolicyRequestCycleListener
- java.lang.Object
-
- org.apache.wicket.coop.CrossOriginOpenerPolicyRequestCycleListener
-
- All Implemented Interfaces:
IRequestCycleListener
public class CrossOriginOpenerPolicyRequestCycleListener extends Object implements IRequestCycleListener
Sets Cross-Origin Opener Policy headers on the responses based on the policy specified byCrossOriginOpenerPolicyConfiguration
. The header is not set for the paths that are exempted from COOP.COOP is a mitigation against cross-origin information leaks and is used to make websites cross-origin isolated. Setting the COOP header allows you to ensure that a top-level window is isolated from other documents by putting them in a different browsing context group, so they cannot directly interact with the top-level window. Using COEP and COOP together allows developers to safely use * powerful features such as
SharedArrayBuffer
,performance.measureMemory()
, * and the JS Self-Profiling API.SeeCrossOriginEmbedderPolicyRequestCycleListener
for instructions * on how to enable COOP. Read more about cross-origin isolation on https://web.dev/why-coop-coep/- Author:
- Santiago Diaz - saldiaz@google.com, Ecenaz Jen Ozmen - ecenazo@google.com
- See Also:
CrossOriginOpenerPolicyConfiguration
,SecuritySettings
-
-
Constructor Summary
Constructors Constructor Description CrossOriginOpenerPolicyRequestCycleListener(CrossOriginOpenerPolicyConfiguration coopConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 Detail
-
CrossOriginOpenerPolicyRequestCycleListener
public CrossOriginOpenerPolicyRequestCycleListener(CrossOriginOpenerPolicyConfiguration coopConfig)
-
-
Method Detail
-
onRequestHandlerResolved
public void onRequestHandlerResolved(RequestCycle cycle, IRequestHandler handler)
Description copied from interface:IRequestCycleListener
Called when anIRequestHandler
is resolved and will be executed.- Specified by:
onRequestHandlerResolved
in interfaceIRequestCycleListener
-
onRequestHandlerExecuted
public void onRequestHandlerExecuted(RequestCycle cycle, IRequestHandler handler)
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
protected void protect(RequestCycle cycle, IRequestHandler handler)
-
-