public final class StrictTransportSecurityServerHttpHeadersWriter extends java.lang.Object implements ServerHttpHeadersWriter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
STRICT_TRANSPORT_SECURITY |
| Constructor and Description |
|---|
StrictTransportSecurityServerHttpHeadersWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
setIncludeSubDomains(boolean includeSubDomains)
Sets if subdomains should be included.
|
void |
setMaxAge(java.time.Duration maxAge)
Sets the max age of the header.
|
void |
setPreload(boolean preload)
Sets if preload should be included.
|
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 STRICT_TRANSPORT_SECURITY
public StrictTransportSecurityServerHttpHeadersWriter()
public reactor.core.publisher.Mono<java.lang.Void> writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)
ServerHttpHeadersWriterwriteHttpHeaders in interface ServerHttpHeadersWriterSupplier of the
ReactiveHttpOutputMessage.beforeCommit(Supplier).public void setIncludeSubDomains(boolean includeSubDomains)
includeSubDomains - if subdomains should be includedpublic void setPreload(boolean preload)
Sets if preload should be included. Default is false
See Website hstspreload.org for additional details.
preload - if preload should be includedpublic void setMaxAge(java.time.Duration maxAge)
maxAge - the max age of the header