public final class CspInterceptor extends AbstractInterceptor implements PreResultListener
CspSettings to add appropriate Content Security Policy header
to the response. These headers determine what the browser will consider a policy violation and the browser's behavior
when a violation occurs. A detailed explanation of CSP can be found here.| Constructor and Description |
|---|
CspInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeResult(ActionInvocation invocation,
String resultCode)
|
String |
intercept(ActionInvocation invocation)
Override to handle interception
|
void |
setEnforcingMode(String value) |
void |
setReportUri(String reportUri) |
destroy, init, setDisabled, shouldInterceptpublic String intercept(ActionInvocation invocation) throws Exception
AbstractInterceptorintercept in interface Interceptorintercept in class AbstractInterceptorinvocation - the action invocationActionInvocation.invoke(), or from the interceptor itself.Exception - any system-level error, as defined in Action.execute().public void beforeResult(ActionInvocation invocation, String resultCode)
PreResultListenerbeforeResult in interface PreResultListenerinvocation - the action invocationresultCode - the result code returned by the action (eg. success).public void setReportUri(String reportUri)
public void setEnforcingMode(String value)
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.