Skip to content

Commit 6367074

Browse files
committed
Polish "Add support for omitting SameSite attribute from session cookie"
See gh-44714
1 parent ccbc4f9 commit 6367074

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebSessionIdResolverAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-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.

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-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.

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Cookie.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-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.
@@ -146,24 +146,25 @@ public void setPartitioned(Boolean partitioned) {
146146
public enum SameSite {
147147

148148
/**
149-
* The SameSite cookie attribute will be omitted when creating the cookie.
149+
* SameSite attribute will be omitted when creating the cookie.
150150
*/
151151
OMITTED(null),
152152

153153
/**
154-
* Cookies are sent in both first-party and cross-origin requests.
154+
* SameSite attribute will be set to None. Cookies are sent in both first-party
155+
* and cross-origin requests.
155156
*/
156157
NONE("None"),
157158

158159
/**
159-
* Cookies are sent in a first-party context, also when following a link to the
160-
* origin site.
160+
* SameSite attribute will be set to Lax. Cookies are sent in a first-party
161+
* context, also when following a link to the origin site.
161162
*/
162163
LAX("Lax"),
163164

164165
/**
165-
* Cookies are only sent in a first-party context (i.e. not when following a link
166-
* to the origin site).
166+
* SameSite attribute will be set to Strict. Cookies are only sent in a
167+
* first-party context (i.e. not when following a link to the origin site).
167168
*/
168169
STRICT("Strict");
169170

0 commit comments

Comments
 (0)