Skip to content

Commit 6e8f71b

Browse files
committed
HBASE-28514: HBase web console automatically listing directories in static/css
1 parent 8afd93e commit 6e8f71b

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

  • hbase-http/src/main/java/org/apache/hadoop/hbase/http
  • hbase-server/src/main/resources/hbase-webapps/static
  • hbase-shaded/hbase-shaded-testing-util/src/main/resources/org/apache/hadoop/hbase/shaded/org/eclipse/jetty/webapp

hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ protected void addDefaultApps(ContextHandlerCollection parent, final String appD
770770
// set up the context for "/static/*"
771771
ServletContextHandler staticContext = new ServletContextHandler(parent, "/static");
772772
staticContext.setResourceBase(appDir + "/static");
773-
staticContext.addServlet(DefaultServlet.class, "/*");
773+
staticContext.addServlet(AdminAuthorizedServlet.class, "/*");
774774
staticContext.setDisplayName("static");
775775
setContextAttributes(staticContext, conf);
776776
defaultContexts.put(staticContext, true);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--
2+
/**
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
-->
20+
<meta HTTP-EQUIV="REFRESH" content="0;url=/master-status"/>

hbase-shaded/hbase-shaded-testing-util/src/main/resources/org/apache/hadoop/hbase/shaded/org/eclipse/jetty/webapp/webdefault.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ limitations under the License.
163163
</init-param>
164164
<init-param>
165165
<param-name>welcomeServlets</param-name>
166-
<param-value>false</param-value>
166+
<param-value>true</param-value>
167167
</init-param>
168168
<init-param>
169169
<param-name>redirectWelcome</param-name>
170-
<param-value>false</param-value>
170+
<param-value>true</param-value>
171171
</init-param>
172172
<init-param>
173173
<param-name>maxCacheSize</param-name>

0 commit comments

Comments
 (0)