public final class XXssProtectionHeaderWriter extends Object implements HeaderWriter
Constructor and Description |
---|
XXssProtectionHeaderWriter()
Create a new instance
|
Modifier and Type | Method and Description |
---|---|
void |
setBlock(boolean block)
If false, will not specify the mode as blocked.
|
void |
setEnabled(boolean enabled)
If true, will contain a value of 1.
|
String |
toString() |
void |
writeHeaders(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Create a
Header instance. |
public XXssProtectionHeaderWriter()
public void writeHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
HeaderWriter
Header
instance.writeHeaders
in interface HeaderWriter
request
- the requestresponse
- the responsepublic void setEnabled(boolean enabled)
X-XSS-Protection: 1or if
setBlock(boolean)
is true
X-XSS-Protection: 1; mode=blockIf false, will explicitly disable specify that X-XSS-Protection is disabled. For example:
X-XSS-Protection: 0
enabled
- the new valuepublic void setBlock(boolean block)
block
- the new value