hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject hadoop git commit: HDFS-12693. Ozone: Enable XFrame options for KSM/SCM web ui. Contributed by Elek, Marton.
Date Thu, 26 Oct 2017 17:20:12 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-7240 f096ab0f0 -> 27f412fad


HDFS-12693. Ozone: Enable XFrame options for KSM/SCM web ui. Contributed by Elek, Marton.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/27f412fa
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/27f412fa
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/27f412fa

Branch: refs/heads/HDFS-7240
Commit: 27f412fad129b1df7bcb68e9153d33033175d936
Parents: f096ab0
Author: Anu Engineer <aengineer@apache.org>
Authored: Thu Oct 26 10:19:45 2017 -0700
Committer: Anu Engineer <aengineer@apache.org>
Committed: Thu Oct 26 10:19:45 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/ozone/web/OzoneHttpServer.java    | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/27f412fa/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/OzoneHttpServer.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/OzoneHttpServer.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/OzoneHttpServer.java
index cad8454..74105aa 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/OzoneHttpServer.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/OzoneHttpServer.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.ozone.web;
 
 import com.google.common.base.Optional;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.DFSUtil;
 import org.apache.hadoop.http.HttpConfig;
 import org.apache.hadoop.http.HttpServer2;
@@ -62,6 +63,17 @@ public abstract class OzoneHttpServer {
       HttpServer2.Builder builder = null;
       builder = DFSUtil.httpServerTemplateForNNAndJN(conf, this.httpAddress,
           this.httpsAddress, name, getSpnegoPrincipal(), getKeytabFile());
+
+      final boolean xFrameEnabled = conf.getBoolean(
+          DFSConfigKeys.DFS_XFRAME_OPTION_ENABLED,
+          DFSConfigKeys.DFS_XFRAME_OPTION_ENABLED_DEFAULT);
+
+      final String xFrameOptionValue = conf.getTrimmed(
+          DFSConfigKeys.DFS_XFRAME_OPTION_VALUE,
+          DFSConfigKeys.DFS_XFRAME_OPTION_VALUE_DEFAULT);
+
+      builder.configureXFrame(xFrameEnabled).setXFrameOption(xFrameOptionValue);
+
       httpServer = builder.build();
 
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message