Skip to content

Commit c98de7a

Browse files
author
Steve Riesenberg
committed
Add xss-protection.header-value in 6.0
Issue gh-9631
1 parent 7c3cc1e commit c98de7a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Diff for: config/src/main/resources/org/springframework/security/config/spring-security-6.0.rnc

+3
Original file line numberDiff line numberDiff line change
@@ -1270,6 +1270,9 @@ xss-protection.attlist &=
12701270
xss-protection.attlist &=
12711271
## Add mode=block to the header or not, default is on.
12721272
attribute block {xsd:boolean}?
1273+
xss-protection.attlist &=
1274+
## Specify the value for the X-Xss-Protection header. When set, overrides both enabled and block attributes.
1275+
attribute header-value {"0"|"1"|"1; mode=block"}?
12731276

12741277
content-type-options =
12751278
## Add a X-Content-Type-Options header to the resopnse. Value is always 'nosniff'.

Diff for: config/src/main/resources/org/springframework/security/config/spring-security-6.0.xsd

+14
Original file line numberDiff line numberDiff line change
@@ -3559,6 +3559,20 @@
35593559
</xs:documentation>
35603560
</xs:annotation>
35613561
</xs:attribute>
3562+
<xs:attribute name="header-value">
3563+
<xs:annotation>
3564+
<xs:documentation>Specify the value for the X-Xss-Protection header. When set, overrides both enabled and
3565+
block attributes.
3566+
</xs:documentation>
3567+
</xs:annotation>
3568+
<xs:simpleType>
3569+
<xs:restriction base="xs:token">
3570+
<xs:enumeration value="0"/>
3571+
<xs:enumeration value="1"/>
3572+
<xs:enumeration value="1; mode=block"/>
3573+
</xs:restriction>
3574+
</xs:simpleType>
3575+
</xs:attribute>
35623576
</xs:attributeGroup>
35633577
<xs:element name="content-type-options">
35643578
<xs:annotation>

0 commit comments

Comments
 (0)