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 Summary
Constructors -
Method Summary
Modifier 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.AbstractInterceptor
destroy, init, setDisabled, shouldIntercept
-
Constructor Details
-
CoopInterceptor
public CoopInterceptor()
-
-
Method Details
-
intercept
Description copied from class:AbstractInterceptorOverride to handle interception- Specified by:
interceptin interfaceInterceptor- Specified by:
interceptin 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:
beforeResultin interfacePreResultListener- Parameters:
invocation- the action invocationresultCode- the result code returned by the action (eg.success).
-
isExempted
-
setExemptedPaths
-
setMode
-