1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Add WebFlux HTTP Headers Reference

Fixes: gh-5868
This commit is contained in:
Rob Winch
2018-09-18 17:09:18 -05:00
parent a7f94b2188
commit 54d07b6b8b
3 changed files with 460 additions and 5 deletions
@@ -2057,6 +2057,15 @@ public class ServerHttpSecurity {
return new FeaturePolicySpec(policyDirectives);
}
/**
* Configures {@code Referrer-Policy} response header.
* @param referrerPolicy the policy to use
* @return the {@link ReferrerPolicySpec} to configure
*/
public HeaderSpec referrerPolicy(ReferrerPolicy referrerPolicy) {
return referrerPolicy().referrerPolicy(referrerPolicy);
}
/**
* Configures {@code Referrer-Policy} response header.
* @return the {@link ReferrerPolicySpec} to configure
@@ -2108,18 +2117,18 @@ public class ServerHttpSecurity {
* The mode to configure. Default is
* {@link org.springframework.security.web.server.header.XFrameOptionsServerHttpHeadersWriter.Mode#DENY}
* @param mode the mode to use
* @return the {@link FrameOptionsSpec} to configure
* @return the {@link HeaderSpec} to configure
*/
public FrameOptionsSpec mode(XFrameOptionsServerHttpHeadersWriter.Mode mode) {
public HeaderSpec mode(XFrameOptionsServerHttpHeadersWriter.Mode mode) {
HeaderSpec.this.frameOptions.setMode(mode);
return this;
return and();
}
/**
* Allows method chaining to continue configuring the {@link ServerHttpSecurity}
* @return the {@link HeaderSpec} to continue configuring
*/
public HeaderSpec and() {
private HeaderSpec and() {
return HeaderSpec.this;
}
@@ -2129,7 +2138,7 @@ public class ServerHttpSecurity {
*/
public HeaderSpec disable() {
HeaderSpec.this.writers.remove(HeaderSpec.this.frameOptions);
return HeaderSpec.this;
return and();
}
private FrameOptionsSpec() {}