[ambari] branch branch-2.7 updated: AMBARI-25390. Disable indexing in /resources endpoint and sub-directories (aonishuk)

2019-10-07 Thread aonishuk
This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
 new 461b5ba  AMBARI-25390. Disable indexing in /resources endpoint and 
sub-directories (aonishuk)
461b5ba is described below

commit 461b5bafe8a0ea66081700cff0a1fe4a96109b48
Author: Andrew Onishuk 
AuthorDate: Mon Oct 7 11:09:37 2019 +0300

AMBARI-25390. Disable indexing in /resources endpoint and sub-directories 
(aonishuk)
---
 ambari-server/src/main/assemblies/server.xml | 5 -
 1 file changed, 5 deletions(-)

diff --git a/ambari-server/src/main/assemblies/server.xml 
b/ambari-server/src/main/assemblies/server.xml
index 6293dd4..67858e7 100644
--- a/ambari-server/src/main/assemblies/server.xml
+++ b/ambari-server/src/main/assemblies/server.xml
@@ -393,11 +393,6 @@
 
 
   755
-  src/main/resources/index.html
-  /var/lib/ambari-server/resources
-
-
-  755
   src/main/resources/kerberos.json
   /var/lib/ambari-server/resources
 



[ambari] branch branch-2.7 updated: AMBARI-25390. Disable indexing in /resources endpoint and sub-directories (aonishuk)

2019-10-04 Thread aonishuk
This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
 new a00a76d  AMBARI-25390. Disable indexing in /resources endpoint and 
sub-directories (aonishuk)
a00a76d is described below

commit a00a76dd33343d54f8e2f9e504f5cea80e48c0d1
Author: Andrew Onishuk 
AuthorDate: Fri Oct 4 14:18:36 2019 +0300

AMBARI-25390. Disable indexing in /resources endpoint and sub-directories 
(aonishuk)
---
 .../apache/ambari/server/controller/AmbariServer.java   |  1 +
 ambari-server/src/main/resources/index.html | 17 -
 2 files changed, 1 insertion(+), 17 deletions(-)

diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index bd99527..b7f44ff 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -511,6 +511,7 @@ public class AmbariServer {
   File resourcesDirectory = new File(configs.getResourceDirPath());
   ServletHolder resources = new ServletHolder(DefaultServlet.class);
   resources.setInitParameter("resourceBase", 
resourcesDirectory.getParent());
+  resources.setInitParameter("dirAllowed", "false");
   root.addServlet(resources, "/resources/*");
   resources.setInitOrder(5);
 
diff --git a/ambari-server/src/main/resources/index.html 
b/ambari-server/src/main/resources/index.html
deleted file mode 100644
index 734b094..000
--- a/ambari-server/src/main/resources/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-