public class XXssProtectionServerHttpHeadersWriter extends java.lang.Object implements ServerHttpHeadersWriter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
X_XSS_PROTECTION |
Constructor and Description |
---|
XXssProtectionServerHttpHeadersWriter()
Creates 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.
|
reactor.core.publisher.Mono<java.lang.Void> |
writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)
Write the headers to the response.
|
public static final java.lang.String X_XSS_PROTECTION
public XXssProtectionServerHttpHeadersWriter()
public reactor.core.publisher.Mono<java.lang.Void> writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)
ServerHttpHeadersWriter
writeHttpHeaders
in interface ServerHttpHeadersWriter
Supplier
of the
ReactiveHttpOutputMessage.beforeCommit(Supplier)
.public 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