Package org.apache.struts2.interceptor
Class CoopInterceptor
java.lang.Object
com.opensymphony.xwork2.interceptor.AbstractInterceptor
org.apache.struts2.interceptor.CoopInterceptor
- All Implemented Interfaces:
ConditionalInterceptor
,Interceptor
,PreResultListener
,Serializable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeResult
(ActionInvocation invocation, String resultCode) intercept
(ActionInvocation invocation) Override to handle interceptionboolean
isExempted
(String path) void
setExemptedPaths
(String paths) void
Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor
destroy, init, setDisabled, shouldIntercept
-
Constructor Details
-
CoopInterceptor
public CoopInterceptor()
-
-
Method Details
-
intercept
Description copied from class:AbstractInterceptor
Override to handle interception- Specified by:
intercept
in interfaceInterceptor
- Specified by:
intercept
in classAbstractInterceptor
- 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 inAction.execute()
.
-
beforeResult
Description copied from interface:PreResultListener
- Specified by:
beforeResult
in interfacePreResultListener
- Parameters:
invocation
- the action invocationresultCode
- the result code returned by the action (eg.success
).
-
isExempted
-
setExemptedPaths
-
setMode
-