public final class FeaturePolicyServerHttpHeadersWriter extends java.lang.Object implements ServerHttpHeadersWriter
Feature-Policy
response header with configured policy directives.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FEATURE_POLICY |
Constructor and Description |
---|
FeaturePolicyServerHttpHeadersWriter() |
Modifier and Type | Method and Description |
---|---|
void |
setPolicyDirectives(java.lang.String policyDirectives)
Set the policy directive(s) to be used in the response header.
|
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 FEATURE_POLICY
public FeaturePolicyServerHttpHeadersWriter()
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 setPolicyDirectives(java.lang.String policyDirectives)
policyDirectives
- the policy directive(s)java.lang.IllegalArgumentException
- if policyDirectives is null
or empty