knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pzamp...@apache.org
Subject [1/4] knox git commit: KNOX-1323 - Reconcile WebAppSecurity provider X-Frame-Options and X-Content-Type-Options param names
Date Fri, 18 May 2018 03:00:45 GMT
Repository: knox
Updated Branches:
  refs/heads/master cfb0ce18c -> 8ea911cc1


http://git-wip-us.apache.org/repos/asf/knox/blob/8ea911cc/gateway-provider-security-webappsec/src/main/java/org/apache/knox/gateway/webappsec/filter/XContentTypeOptionsFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-webappsec/src/main/java/org/apache/knox/gateway/webappsec/filter/XContentTypeOptionsFilter.java
b/gateway-provider-security-webappsec/src/main/java/org/apache/knox/gateway/webappsec/filter/XContentTypeOptionsFilter.java
index 301f8bb..b05b335 100644
--- a/gateway-provider-security-webappsec/src/main/java/org/apache/knox/gateway/webappsec/filter/XContentTypeOptionsFilter.java
+++ b/gateway-provider-security-webappsec/src/main/java/org/apache/knox/gateway/webappsec/filter/XContentTypeOptionsFilter.java
@@ -33,7 +33,7 @@ public class XContentTypeOptionsFilter implements Filter {
 
   public static final String X_CONTENT_TYPE_OPTIONS_HEADER = "X-Content-Type-Options";
 
-  public static final String CUSTOM_HEADER_PARAM = "xcontent-type.options.value";
+  public static final String CUSTOM_HEADER_PARAM = "xcontent-type.options";
 
   public static final String DEFAULT_OPTION_VALUE = "nosniff";
 

http://git-wip-us.apache.org/repos/asf/knox/blob/8ea911cc/gateway-provider-security-webappsec/src/test/java/org/apache/knox/gateway/webappsec/XContentTypeOptionsFilterTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-webappsec/src/test/java/org/apache/knox/gateway/webappsec/XContentTypeOptionsFilterTest.java
b/gateway-provider-security-webappsec/src/test/java/org/apache/knox/gateway/webappsec/XContentTypeOptionsFilterTest.java
index 98eff29..e5fb587 100644
--- a/gateway-provider-security-webappsec/src/test/java/org/apache/knox/gateway/webappsec/XContentTypeOptionsFilterTest.java
+++ b/gateway-provider-security-webappsec/src/test/java/org/apache/knox/gateway/webappsec/XContentTypeOptionsFilterTest.java
@@ -76,7 +76,7 @@ public class XContentTypeOptionsFilterTest {
       XContentTypeOptionsFilter filter = new XContentTypeOptionsFilter();
       Properties props = new Properties();
       props.put("xcontent-type.options.enabled", "true");
-      props.put("xcontent-type.options.value", customOption);
+      props.put("xcontent-type.options", customOption);
       filter.init(new TestFilterConfig(props));
 
       HttpServletRequest request = EasyMock.createNiceMock(HttpServletRequest.class);


Mime
View raw message