Skip to content

Commit 8320c76

Browse files
committed
Fix method chaining for ContentSecurityPolicySpec
Signed-off-by: Ziqin Wang <ziqin@wangziqin.net>
1 parent 8254f58 commit 8320c76

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,7 +2830,7 @@ public HeaderSpec headerValue(XXssProtectionServerHttpHeadersWriter.HeaderValue
28302830
* Configures {@code Content-Security-Policy} response header.
28312831
*
28322832
* @since 5.1
2833-
* @see #contentSecurityPolicy(String)
2833+
* @see #contentSecurityPolicy(Customizer)
28342834
*/
28352835
public final class ContentSecurityPolicySpec {
28362836

@@ -2845,21 +2845,21 @@ private ContentSecurityPolicySpec() {
28452845
* in the response. Otherwise, defaults to the {@code Content-Security-Policy}
28462846
* header.
28472847
* @param reportOnly whether to only report policy violations
2848-
* @return the {@link HeaderSpec} to continue configuring
2848+
* @return the {@link ContentSecurityPolicySpec} to continue configuring
28492849
*/
2850-
public HeaderSpec reportOnly(boolean reportOnly) {
2850+
public ContentSecurityPolicySpec reportOnly(boolean reportOnly) {
28512851
HeaderSpec.this.contentSecurityPolicy.setReportOnly(reportOnly);
2852-
return HeaderSpec.this;
2852+
return this;
28532853
}
28542854

28552855
/**
28562856
* Sets the security policy directive(s) to be used in the response header.
28572857
* @param policyDirectives the security policy directive(s)
2858-
* @return the {@link HeaderSpec} to continue configuring
2858+
* @return the {@link ContentSecurityPolicySpec} to continue configuring
28592859
*/
2860-
public HeaderSpec policyDirectives(String policyDirectives) {
2860+
public ContentSecurityPolicySpec policyDirectives(String policyDirectives) {
28612861
HeaderSpec.this.contentSecurityPolicy.setPolicyDirectives(policyDirectives);
2862-
return HeaderSpec.this;
2862+
return this;
28632863
}
28642864

28652865
private ContentSecurityPolicySpec(String policyDirectives) {

0 commit comments

Comments
 (0)