mirror of
https://github.com/apache/struts.git
synced 2026-08-05 14:47:09 +00:00
Merge pull request #1317 from apache/feature/WW-5511-removes-addCspHeaders
WW-5511 Removes deprecated addCspHeaders method
This commit is contained in:
@@ -45,11 +45,10 @@ public interface CspSettings {
|
||||
String CSP_REPORT_TYPE = "application/csp-report";
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #addCspHeaders(HttpServletRequest, HttpServletResponse)} instead
|
||||
* Adds CSP related headers to response based on request state (e.g., if session has been created)
|
||||
*
|
||||
* @since Struts 6.0.3
|
||||
*/
|
||||
@Deprecated
|
||||
void addCspHeaders(HttpServletResponse response);
|
||||
|
||||
void addCspHeaders(HttpServletRequest request, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,11 +52,6 @@ public class DefaultCspSettings implements CspSettings {
|
||||
// default to reporting mode
|
||||
protected String cspHeader = CSP_REPORT_HEADER;
|
||||
|
||||
@Override
|
||||
public void addCspHeaders(HttpServletResponse response) {
|
||||
throw new UnsupportedOperationException("Unsupported implementation, use #addCspHeaders(HttpServletRequest request, HttpServletResponse response)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCspHeaders(HttpServletRequest request, HttpServletResponse response) {
|
||||
if (isSessionActive(request)) {
|
||||
|
||||
Reference in New Issue
Block a user