You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ma...@apache.org on 2022/01/07 20:37:10 UTC
[archiva] branch archiva-2.x updated: Switching to context param for dirlist deactivation
This is an automated email from the ASF dual-hosted git repository.
martin_s pushed a commit to branch archiva-2.x
in repository https://gitbox.apache.org/repos/asf/archiva.git
The following commit(s) were added to refs/heads/archiva-2.x by this push:
new f62b75f Switching to context param for dirlist deactivation
f62b75f is described below
commit f62b75fabbac20aa44383900407eb69384cc58fb
Author: Martin Schreier <ma...@apache.org>
AuthorDate: Fri Jan 7 21:37:04 2022 +0100
Switching to context param for dirlist deactivation
---
.../archiva-webapp/src/main/webapp/WEB-INF/web.xml | 17 ++++++-----------
1 file 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 fd5bea2..b55783c 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>