knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pzamp...@apache.org
Subject knox git commit: KNOX-1310 - Handle custom param value for X-Content-Type-Options header
Date Wed, 16 May 2018 03:28:26 GMT
Repository: knox
Updated Branches:
  refs/heads/master 29614f386 -> 8f47214ae


KNOX-1310 - Handle custom param value for X-Content-Type-Options header


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/8f47214a
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/8f47214a
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/8f47214a

Branch: refs/heads/master
Commit: 8f47214ae6da788c67d3432cf3321e6de8dd76db
Parents: 29614f3
Author: Phil Zampino <pzampino@apache.org>
Authored: Tue May 15 23:13:55 2018 -0400
Committer: Phil Zampino <pzampino@apache.org>
Committed: Tue May 15 23:13:55 2018 -0400

----------------------------------------------------------------------
 .../knox/gateway/webappsec/filter/XContentTypeOptionsFilter.java   | 2 +-
 .../knox/gateway/webappsec/XContentTypeOptionsFilterTest.java      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/8f47214a/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 b05b335..301f8bb 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";
+  public static final String CUSTOM_HEADER_PARAM = "xcontent-type.options.value";
 
   public static final String DEFAULT_OPTION_VALUE = "nosniff";
 

http://git-wip-us.apache.org/repos/asf/knox/blob/8f47214a/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 e5fb587..98eff29 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", customOption);
+      props.put("xcontent-type.options.value", customOption);
       filter.init(new TestFilterConfig(props));
 
       HttpServletRequest request = EasyMock.createNiceMock(HttpServletRequest.class);


Mime
View raw message