Skip to content

Commit edff9ae

Browse files
committed
WithHttpOnlyCookie defaults to false
Closes gh-16820 Signed-off-by: DingHao <[email protected]>
1 parent a9acb6d commit edff9ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/src/main/java/org/springframework/security/web/server/csrf/CookieServerCsrfTokenRepository.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ public void setCookieCustomizer(Consumer<ResponseCookie.ResponseCookieBuilder> c
8484
*/
8585
public static CookieServerCsrfTokenRepository withHttpOnlyFalse() {
8686
CookieServerCsrfTokenRepository result = new CookieServerCsrfTokenRepository();
87-
result.setCookieCustomizer((cookie) -> cookie.httpOnly(false));
87+
result.cookieHttpOnly = false;
8888
return result;
8989
}
9090

0 commit comments

Comments
 (0)