summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schreier <martin_s@apache.org>2022-01-07 21:37:04 +0100
committerMartin Schreier <martin_s@apache.org>2022-01-07 21:37:04 +0100
commitf62b75fabbac20aa44383900407eb69384cc58fb (patch)
treee08cbcc3e03d979a051a157653fea90ef48388fb
parentdd9667fab4c8e989435e2ca63b24e82160676158 (diff)
downloadarchiva-f62b75fabbac20aa44383900407eb69384cc58fb.tar.gz
archiva-f62b75fabbac20aa44383900407eb69384cc58fb.zip
Switching to context param for dirlist deactivation
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml17
1 files changed, 6 insertions, 11 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
index fd5bea2d7..b55783c8d 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
@@ -42,6 +42,12 @@
<param-value>/sirona-monitoring</param-value>
</context-param>
+ <!-- Deactivate directory listing of jetty servlet -->
+ <context-param>
+ <param-name>org.eclipse.jetty.servlet.Default.dirAllowed</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
@@ -161,17 +167,6 @@
<url-pattern>/restServices/*</url-pattern>
</servlet-mapping>
- <!-- Removing dir-listing from Jetty default-servlet -->
- <servlet>
- <servlet-name>default</servlet-name>
- <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
- <init-param>
- <param-name>dirAllowed</param-name>
- <param-value>false</param-value>
- </init-param>
- <load-on-startup>0</load-on-startup>
- </servlet>
-
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>