diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/SecurityHeadersFilter.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/SecurityHeadersFilter.java index 01c8a32c62a0..08e34085a0c8 100644 --- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/SecurityHeadersFilter.java +++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/SecurityHeadersFilter.java @@ -69,10 +69,27 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha public void destroy() { } + /** + * @param conf configuration + * @param isSecure use secure defaults if 'true' + * @return default parameters, as a map + */ public static Map getDefaultParameters(Configuration conf, boolean isSecure) { Map params = new HashMap<>(); params.put("hsts", conf.get("hbase.http.filter.hsts.value", isSecure ? DEFAULT_HSTS : "")); params.put("csp", conf.get("hbase.http.filter.csp.value", isSecure ? DEFAULT_CSP : "")); return params; } + + /** + * @param conf configuration + * @return default parameters, as a map + * @deprecated Use {@link SecurityHeadersFilter#getDefaultParameters(Configuration, boolean)} + * instead. + */ + @Deprecated + public static Map getDefaultParameters(Configuration conf) { + return getDefaultParameters(conf, false); + } + }