Package org.apache.struts2.interceptor
Class CoepInterceptor
java.lang.Object
org.apache.struts2.interceptor.AbstractInterceptor
org.apache.struts2.interceptor.CoepInterceptor
- All Implemented Interfaces:
Serializable
,ConditionalInterceptor
,Interceptor
,PreResultListener
Interceptor that implements Cross-Origin Embedder Policy on incoming requests used to protect a
document from loading any non-same-origin resources which don't explicitly grant the document
permission to be loaded.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeResult
(ActionInvocation invocation, String resultCode) intercept
(ActionInvocation invocation) Override to handle interceptionvoid
setEnforcingMode
(String mode) void
setExemptedPaths
(String paths) Methods inherited from class org.apache.struts2.interceptor.AbstractInterceptor
destroy, init, setDisabled, shouldIntercept
-
Constructor Details
-
CoepInterceptor
public CoepInterceptor()
-
-
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
).
-
setExemptedPaths
-
setEnforcingMode
-