]> git.pld-linux.org Git - packages/jenkins.git/blob - web.xml
- initial
[packages/jenkins.git] / web.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
3          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
5          version="2.4">
6   <display-name>Hudson</display-name>
7   <description>Build management system</description>
8
9   <servlet>
10     <servlet-name>Stapler</servlet-name>
11     <servlet-class>org.kohsuke.stapler.Stapler</servlet-class>
12     <init-param>
13       <param-name>default-encodings</param-name>
14       <param-value>text/html=UTF-8</param-value>
15     </init-param>
16   </servlet>
17
18   <servlet-mapping>
19     <servlet-name>Stapler</servlet-name>
20     <url-pattern>/</url-pattern>
21   </servlet-mapping>
22
23   <filter>
24     <filter-name>authentication-filter</filter-name>
25     <filter-class>hudson.security.HudsonFilter</filter-class>
26   </filter>
27
28   <!--
29         The Headers filter allows us to to override headers sent by the container
30         that may be in conflict with what we want.  For example, Tomcat will set
31         Cache-Control: no-cache for any files behind the security-constraint
32         below.  So if Hudson is on a public server, and you want to only allow
33         authorized users to access it, you may want to pay attention to this.
34         
35         See: http://www.nabble.com/No-browser-caching-with-Hudson- -tf4601857.html
36   
37   <filter>
38     <filter-name>change-headers-filter</filter-name>
39     <filter-class>hudson.ResponseHeaderFilter</filter-class>
40     <!- The value listed here is for 24 hours.  Increase or decrease as you see 
41     fit.  Value is in seconds. Make sure to keep the public option ->
42     <init-param>
43       <param-name>Cache-Control</param-name>
44       <param-value>max-age=86400, public</param-value>
45     </init-param>
46     <!- It turns out that Tomcat just doesn't want to let
47     go of its cache option.  If you override Cache-Control,
48     it starts to send Pragma: no-cache as a backup.
49      ->
50     <init-param>
51       <param-name>Pragma</param-name>
52       <param-value>public</param-value>
53     </init-param>
54   </filter>
55   -->
56   
57   <filter-mapping>
58     <filter-name>authentication-filter</filter-name>
59     <url-pattern>/*</url-pattern>
60   </filter-mapping>
61
62   <filter>
63     <filter-name>plugins-filter</filter-name>
64     <filter-class>hudson.util.PluginServletFilter</filter-class>
65   </filter>
66   <filter-mapping>
67     <filter-name>plugins-filter</filter-name>
68     <url-pattern>/*</url-pattern>
69   </filter-mapping>
70
71   <!-- Uncomment this if you are protecting your entire hudson setup
72         from public view.  See note above about the filter.
73   <filter-mapping>
74     <filter-name>change-headers-filter</filter-name>
75     <!- This path should match the value of:
76                 /security-constraint/web-resource-collection/url-pattern
77      ->
78     <url-pattern>/*</url-pattern>
79   </filter-mapping>
80   -->
81   
82   <listener>
83     <listener-class>hudson.WebAppMain</listener-class>
84   </listener>
85
86   <security-role>
87     <!-- admins can add/remove/configure projects -->
88     <role-name>admin</role-name>
89   </security-role>
90
91   <security-constraint>
92     <web-resource-collection>
93       <web-resource-name>Hudson</web-resource-name>
94       <url-pattern>/loginEntry</url-pattern>
95       <!--http-method>GET</http-method-->
96     </web-resource-collection>
97     <auth-constraint>
98       <role-name>*</role-name>
99     </auth-constraint>
100   </security-constraint>
101
102   <login-config>
103     <auth-method>FORM</auth-method>
104     <form-login-config>
105       <form-login-page>/login</form-login-page>
106       <form-error-page>/loginError</form-error-page>
107     </form-login-config>
108   </login-config>
109
110
111   <!-- if specified, this value is used as the Hudson home directory -->
112   <env-entry>
113     <env-entry-name>HUDSON_HOME</env-entry-name>
114     <env-entry-type>java.lang.String</env-entry-type>
115     <env-entry-value>/var/lib/hudson</env-entry-value>
116   </env-entry>
117 </web-app>
This page took 0.06412 seconds and 3 git commands to generate.