mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-06 08:36:01 +00:00
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15081 71c3de6d-444a-0410-be80-ed276b4c234a
141 lines
4.9 KiB
XML
141 lines
4.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
The MIT License
|
|
|
|
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Tom Huybrechts, id:digerata
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
THE SOFTWARE.
|
|
-->
|
|
|
|
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
|
version="2.4">
|
|
<display-name>Hudson</display-name>
|
|
<description>Build management system</description>
|
|
|
|
<servlet>
|
|
<servlet-name>Stapler</servlet-name>
|
|
<servlet-class>org.kohsuke.stapler.Stapler</servlet-class>
|
|
<init-param>
|
|
<param-name>default-encodings</param-name>
|
|
<param-value>text/html=UTF-8</param-value>
|
|
</init-param>
|
|
</servlet>
|
|
|
|
<servlet-mapping>
|
|
<servlet-name>Stapler</servlet-name>
|
|
<url-pattern>/</url-pattern>
|
|
</servlet-mapping>
|
|
|
|
<filter>
|
|
<filter-name>authentication-filter</filter-name>
|
|
<filter-class>hudson.security.HudsonFilter</filter-class>
|
|
</filter>
|
|
|
|
<!--
|
|
The Headers filter allows us to to override headers sent by the container
|
|
that may be in conflict with what we want. For example, Tomcat will set
|
|
Cache-Control: no-cache for any files behind the security-constraint
|
|
below. So if Hudson is on a public server, and you want to only allow
|
|
authorized users to access it, you may want to pay attention to this.
|
|
|
|
See: http://www.nabble.com/No-browser-caching-with-Hudson- -tf4601857.html
|
|
|
|
<filter>
|
|
<filter-name>change-headers-filter</filter-name>
|
|
<filter-class>hudson.ResponseHeaderFilter</filter-class>
|
|
<!- The value listed here is for 24 hours. Increase or decrease as you see
|
|
fit. Value is in seconds. Make sure to keep the public option ->
|
|
<init-param>
|
|
<param-name>Cache-Control</param-name>
|
|
<param-value>max-age=86400, public</param-value>
|
|
</init-param>
|
|
<!- It turns out that Tomcat just doesn't want to let
|
|
go of its cache option. If you override Cache-Control,
|
|
it starts to send Pragma: no-cache as a backup.
|
|
->
|
|
<init-param>
|
|
<param-name>Pragma</param-name>
|
|
<param-value>public</param-value>
|
|
</init-param>
|
|
</filter>
|
|
-->
|
|
|
|
<filter-mapping>
|
|
<filter-name>authentication-filter</filter-name>
|
|
<url-pattern>/*</url-pattern>
|
|
</filter-mapping>
|
|
|
|
<filter>
|
|
<filter-name>plugins-filter</filter-name>
|
|
<filter-class>hudson.util.PluginServletFilter</filter-class>
|
|
</filter>
|
|
<filter-mapping>
|
|
<filter-name>plugins-filter</filter-name>
|
|
<url-pattern>/*</url-pattern>
|
|
</filter-mapping>
|
|
|
|
<!-- Uncomment this if you are protecting your entire hudson setup
|
|
from public view. See note above about the filter.
|
|
<filter-mapping>
|
|
<filter-name>change-headers-filter</filter-name>
|
|
<!- This path should match the value of:
|
|
/security-constraint/web-resource-collection/url-pattern
|
|
->
|
|
<url-pattern>/*</url-pattern>
|
|
</filter-mapping>
|
|
-->
|
|
|
|
<listener>
|
|
<listener-class>hudson.WebAppMain</listener-class>
|
|
</listener>
|
|
|
|
<security-role>
|
|
<!-- admins can add/remove/configure projects -->
|
|
<role-name>admin</role-name>
|
|
</security-role>
|
|
|
|
<security-constraint>
|
|
<web-resource-collection>
|
|
<web-resource-name>Hudson</web-resource-name>
|
|
<url-pattern>/loginEntry</url-pattern>
|
|
<!--http-method>GET</http-method-->
|
|
</web-resource-collection>
|
|
<auth-constraint>
|
|
<role-name>*</role-name>
|
|
</auth-constraint>
|
|
</security-constraint>
|
|
|
|
<login-config>
|
|
<auth-method>FORM</auth-method>
|
|
<form-login-config>
|
|
<form-login-page>/login</form-login-page>
|
|
<form-error-page>/loginError</form-error-page>
|
|
</form-login-config>
|
|
</login-config>
|
|
|
|
|
|
<!-- if specified, this value is used as the Hudson home directory -->
|
|
<env-entry>
|
|
<env-entry-name>HUDSON_HOME</env-entry-name>
|
|
<env-entry-type>java.lang.String</env-entry-type>
|
|
<env-entry-value></env-entry-value>
|
|
</env-entry>
|
|
</web-app> |