Newer
Older
gitbucket_jkp / src / main / webapp / WEB-INF / web.xml
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app xmlns="http://java.sun.com/xml/ns/javaee"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  5. version="3.0">
  6.  
  7. <!-- Put your home directory here -->
  8. <context-param>
  9. <param-name>gitbucket.home</param-name>
  10. <param-value>/opt/gitbucket</param-value>
  11. </context-param>
  12.  
  13. <!-- ===================================================================== -->
  14. <!-- Session configuration -->
  15. <!-- ===================================================================== -->
  16. <listener>
  17. <listener-class>gitbucket.core.servlet.SessionCleanupListener</listener-class>
  18. </listener>
  19.  
  20. <!-- ===================================================================== -->
  21. <!-- Automatic migration and plug-in initialization -->
  22. <!-- ===================================================================== -->
  23. <listener>
  24. <listener-class>gitbucket.core.servlet.InitializeListener</listener-class>
  25. </listener>
  26.  
  27.  
  28. <!-- ===================================================================== -->
  29. <!-- Scalatra configuration -->
  30. <!-- ===================================================================== -->
  31. <listener>
  32. <listener-class>org.scalatra.servlet.ScalatraListener</listener-class>
  33. </listener>
  34.  
  35. <!-- ===================================================================== -->
  36. <!-- SSH Daemon initialized -->
  37. <!-- ===================================================================== -->
  38. <listener>
  39. <listener-class>gitbucket.core.ssh.SshServerListener</listener-class>
  40. </listener>
  41.  
  42. <!-- ===================================================================== -->
  43. <!-- HTTP interface for Git repositories -->
  44. <!-- ===================================================================== -->
  45. <servlet>
  46. <servlet-name>GitRepositoryServlet</servlet-name>
  47. <servlet-class>gitbucket.core.servlet.GitRepositoryServlet</servlet-class>
  48. </servlet>
  49.  
  50. <servlet-mapping>
  51. <servlet-name>GitRepositoryServlet</servlet-name>
  52. <url-pattern>/git/*</url-pattern>
  53. </servlet-mapping>
  54.  
  55. <servlet>
  56. <servlet-name>GitLfsTransferServlet</servlet-name>
  57. <servlet-class>gitbucket.core.servlet.GitLfsTransferServlet</servlet-class>
  58. </servlet>
  59.  
  60. <servlet-mapping>
  61. <servlet-name>GitLfsTransferServlet</servlet-name>
  62. <url-pattern>/git-lfs/*</url-pattern>
  63. </servlet-mapping>
  64.  
  65.  
  66. <!-- ===================================================================== -->
  67. <!-- Supply assets which are provided by plugins -->
  68. <!-- ===================================================================== -->
  69. <servlet>
  70. <servlet-name>PluginAssetsServlet</servlet-name>
  71. <servlet-class>gitbucket.core.servlet.PluginAssetsServlet</servlet-class>
  72. </servlet>
  73.  
  74. <servlet-mapping>
  75. <servlet-name>PluginAssetsServlet</servlet-name>
  76. <url-pattern>/plugin-assets/*</url-pattern>
  77. </servlet-mapping>
  78.  
  79. <!-- ===================================================================== -->
  80. <!-- Session timeout -->
  81. <!-- ===================================================================== -->
  82. <session-config>
  83. <session-timeout>1440</session-timeout>
  84. <cookie-config>
  85. <http-only>true</http-only>
  86. </cookie-config>
  87. </session-config>
  88.  
  89. <mime-mapping>
  90. <extension>svg</extension>
  91. <mime-type>image/svg+xml</mime-type>
  92. </mime-mapping>
  93.  
  94. <!-- <Configure class="org.eclipse.jetty.webapp.WebAppContext">
  95. <Set name="contextPath">/gitbucket-from-src</Set>
  96. <Set name="war">/opt/gitbucket-from-src/gitbucket.war</Set>
  97. </Configure>
  98.  
  99. <Set name="gitbucket.home" property="/opt/gitbucket-from-src/data"/>
  100. -->
  101.  
  102. </web-app>