private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services for sponsored feature development
The header filter sets or adds headers to each response based on an optionally included/excluded list of path specs, mime types, and/or HTTP methods.
This filter processes its configured headers before calling
doFilter in the filter chain. Some of the headers configured in this filter may get overwritten by other filters and/or the servlet processing the request.
To use the Header Filter, these JAR files must be available in WEB-INF/lib:
Place the configuration in a webapp’s
This filter will perform the following actions on each response:
Each action must be separated by a comma.
<filter> <filter-name>HeaderFilter</filter-name> <filter-class>org.eclipse.jetty.servlets.HeaderFilter</filter-class> <init-param> <param-name>headerConfig</param-name> <param-value> set X-Frame-Options: DENY, "add Cache-Control: no-cache, no-store, must-revalidate", setDate Expires: 31540000000, addDate Date: 0 </param-value> </init-param> </filter>
init parameters control the behavior of the filter:
action headerName: headerValue.
Supported header actions:
set- causes set
setHeaderto be called on the response
add- causes set
addHeaderto be called on the response
setDateHeaderto be called on the response.
addDateHeaderto be called on the response.
addDate is used,
headerValue should be the number of milliseconds to add to the current system time before writing the header value.
If a property is both included and excluded by the filter configuration, then it will be considered excluded.
Path spec rules:
^, the spec is assumed to be a regex based path spec and will match with normal Java regex rules.
/, the spec is assumed to be a Servlet url-pattern rules path spec for either an exact match or prefix based match.
*., the spec is assumed to be a Servlet url-pattern rules path spec for a suffix based match.