Skip to content

Commit 1f06088

Browse files
committed
Use report-to exclusively in CSPs
1 parent a0fc13f commit 1f06088

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

api/src/org/labkey/filters/ContentSecurityPolicyFilter.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ private void extractCspVersion(String s)
203203
}
204204
}
205205

206-
private static final String X_FRAME_OPTIONS_HEADER_NAME = "X-Frame-Options";
207-
208206
@Override
209207
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
210208
{
@@ -231,15 +229,7 @@ private String getSubstitutedCsp(HttpServletRequest req)
231229

232230
if (getType() != ContentSecurityPolicyType.Enforce || !OptionalFeatureService.get().isFeatureEnabled(FEATURE_FLAG_DISABLE_ENFORCE_CSP))
233231
{
234-
Map<String, String> map = Map.of(NONCE_SUBST, getScriptNonceHeader(req));
235-
String csp = expression.eval(map);
236-
237-
if ("https".equals(req.getScheme()))
238-
{
239-
csp = csp + " report-to csp-report ;";
240-
}
241-
242-
return csp;
232+
return expression.eval(Map.of(NONCE_SUBST, getScriptNonceHeader(req)));
243233
}
244234

245235
return null;

0 commit comments

Comments
 (0)