File: add-header-policy.xml

package info (click to toggle)
libowasp-esapi-java 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 7,480 kB
  • ctags: 4,161
  • sloc: java: 26,333; xml: 1,309; sh: 293; makefile: 4
file content (29 lines) | stat: -rw-r--r-- 721 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="UTF-8"?>

	<!--
	This test file exemplifies an add-header rule.

	Protection #1: Any response for a resource will contain a header "FOO" with
	               a value "BAR".

	Exception #1:  Any request for /marketing/* will not have any such header
	               returned.
	-->

<policy>

	<settings>
		<mode>redirect</mode>
		<error-handling>
			<default-redirect-page>/security/error.jsp</default-redirect-page>
			<block-status>403</block-status>
		</error-handling>
	</settings>
	
	<outbound-rules>
		<add-header name="FOO" value="BAR" path="/.*">
			<path-exception type="regex">/marketing/.*</path-exception>
		</add-header>
	</outbound-rules>
	
</policy>