diff options
author | Luca <ltoscano@wikimedia.org> | 2021-01-15 17:25:25 +0100 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2021-01-17 17:11:19 +0100 |
commit | 09ada1604274d54efef155205e20f344361418f0 (patch) | |
tree | 25d976eadd890c450a25d1b485c6e385b3618696 /archiva-modules | |
parent | ebd46ab1cec4d76e9b40b49a41ac7886417b029f (diff) | |
download | archiva-09ada1604274d54efef155205e20f344361418f0.tar.gz archiva-09ada1604274d54efef155205e20f344361418f0.zip |
Avoid Jetty's default directory listing settings in web.xml
The directory listing servlet seems not be needed for the default
settings. This change explicitly sets it off in web.xml.
Credis to @jobar for the original change made for Wikimedia.
Git Pull Request #61
Signed-off-by: Martin Stockhammer <martin_s@apache.org>
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml | 13 |
1 files changed, 12 insertions, 1 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 fa04fc605..4db7ae535 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 @@ -161,7 +161,18 @@ <servlet-name>CXFServletV2</servlet-name> <url-pattern>/api/*</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> |