public class XXssProtectionHttpHeadersWriter extends java.lang.Object implements HttpHeadersWriter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
X_XSS_PROTECTION |
| Constructor and Description |
|---|
XXssProtectionHttpHeadersWriter() |
| 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 reactor.core.publisher.Mono<java.lang.Void> writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)
HttpHeadersWriterwriteHttpHeaders in interface HttpHeadersWriterSupplier 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