public interface CspSettings
CspInterceptor
to add the CSP header to the response.
The default implementation can be found in DefaultCspSettings
.DefaultCspSettings
Modifier and Type | Field and Description |
---|---|
static String |
BASE_URI |
static String |
CSP_ENFORCE_HEADER |
static String |
CSP_REPORT_HEADER |
static String |
CSP_REPORT_TYPE |
static String |
HTTP |
static String |
HTTPS |
static int |
NONCE_RANDOM_LENGTH |
static String |
NONE |
static String |
OBJECT_SRC |
static String |
REPORT_TO |
static String |
REPORT_URI |
static String |
SCRIPT_SRC |
static String |
STRICT_DYNAMIC |
Modifier and Type | Method and Description |
---|---|
void |
addCspHeaders(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
addCspHeaders(javax.servlet.http.HttpServletResponse response)
Deprecated.
|
void |
setEnforcingMode(boolean value)
Sets CSP headers in enforcing mode when true, and report-only when false
|
void |
setReportTo(String group)
Sets the report group where csp violation reports will be sent
|
void |
setReportUri(String uri)
Sets the uri where csp violation reports will be sent
|
static final int NONCE_RANDOM_LENGTH
static final String CSP_ENFORCE_HEADER
static final String CSP_REPORT_HEADER
static final String OBJECT_SRC
static final String SCRIPT_SRC
static final String BASE_URI
static final String REPORT_URI
static final String REPORT_TO
static final String NONE
static final String STRICT_DYNAMIC
static final String HTTP
static final String HTTPS
static final String CSP_REPORT_TYPE
@Deprecated void addCspHeaders(javax.servlet.http.HttpServletResponse response)
addCspHeaders(HttpServletRequest, HttpServletResponse)
insteadvoid addCspHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
void setReportUri(String uri)
void setReportTo(String group)
void setEnforcingMode(boolean value)
Copyright © 2000–2024 Apache Software Foundation. All rights reserved.