Package org.apache.struts2.interceptor
Class CoopInterceptor
java.lang.Object
org.apache.struts2.interceptor.AbstractInterceptor
org.apache.struts2.interceptor.CoopInterceptor
- All Implemented Interfaces:
- Serializable,- ConditionalInterceptor,- Interceptor,- PreResultListener
Interceptor that implements Cross-Origin Opener Policy on incoming requests. 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.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidbeforeResult(ActionInvocation invocation, String resultCode) intercept(ActionInvocation invocation) Override to handle interceptionbooleanisExempted(String path) voidsetExemptedPaths(String paths) voidMethods inherited from class org.apache.struts2.interceptor.AbstractInterceptordestroy, init, setDisabled, shouldIntercept
- 
Constructor Details- 
CoopInterceptorpublic CoopInterceptor()
 
- 
- 
Method Details- 
interceptDescription copied from class:AbstractInterceptorOverride to handle interception- Specified by:
- interceptin interface- Interceptor
- Specified by:
- interceptin class- AbstractInterceptor
- Parameters:
- invocation- the action invocation
- Returns:
- the return code, either returned from ActionInvocation.invoke(), or from the interceptor itself.
- Throws:
- Exception- any system-level error, as defined in- Action.execute().
 
- 
beforeResultDescription copied from interface:PreResultListener- Specified by:
- beforeResultin interface- PreResultListener
- Parameters:
- invocation- the action invocation
- resultCode- the result code returned by the action (eg.- success).
 
- 
isExempted
- 
setExemptedPaths
- 
setMode
 
-