Class FeaturePolicyServerHttpHeadersWriter
java.lang.Object
org.springframework.security.web.server.header.FeaturePolicyServerHttpHeadersWriter
- All Implemented Interfaces:
 ServerHttpHeadersWriter
public final class FeaturePolicyServerHttpHeadersWriter
extends Object
implements ServerHttpHeadersWriter
Writes the 
Feature-Policy response header with configured policy directives.- Since:
 - 5.1
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidsetPolicyDirectives(String policyDirectives) Set the policy directive(s) to be used in the response header.reactor.core.publisher.Mono<Void>writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange) Write the headers to the response. 
- 
Field Details
- 
FEATURE_POLICY
- See Also:
 
 
 - 
 - 
Constructor Details
- 
FeaturePolicyServerHttpHeadersWriter
public FeaturePolicyServerHttpHeadersWriter() 
 - 
 - 
Method Details
- 
writeHttpHeaders
public reactor.core.publisher.Mono<Void> writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange) Description copied from interface:ServerHttpHeadersWriterWrite the headers to the response.- Specified by:
 writeHttpHeadersin interfaceServerHttpHeadersWriter- Returns:
 - A Mono which is returned to the 
Supplierof theReactiveHttpOutputMessage.beforeCommit(Supplier). 
 - 
setPolicyDirectives
Set the policy directive(s) to be used in the response header.- Parameters:
 policyDirectives- the policy directive(s)- Throws:
 IllegalArgumentException- if policyDirectives isnullor empty
 
 -