|
53 | 53 | import org.springframework.web.server.ServerWebExchange;
|
54 | 54 | import org.springframework.web.server.WebFilterChain;
|
55 | 55 | import org.springframework.web.server.adapter.ForwardedHeaderTransformer;
|
56 |
| -import org.springframework.web.server.session.CookieWebSessionIdResolver; |
57 | 56 | import org.springframework.web.server.session.WebSessionIdResolver;
|
58 | 57 | import reactor.core.publisher.Mono;
|
59 | 58 |
|
60 |
| -import java.time.Duration; |
61 | 59 | import java.util.HashSet;
|
62 | 60 | import java.util.List;
|
63 | 61 |
|
|
73 | 71 | import static com.appsmith.server.constants.Url.USAGE_PULSE_URL;
|
74 | 72 | import static com.appsmith.server.constants.Url.USER_URL;
|
75 | 73 | import static com.appsmith.server.constants.ce.UrlCE.CONSOLIDATED_API_URL;
|
76 |
| -import static java.time.temporal.ChronoUnit.DAYS; |
77 | 74 |
|
78 | 75 | @EnableWebFluxSecurity
|
79 | 76 | @EnableReactiveMethodSecurity
|
@@ -271,13 +268,7 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
|
271 | 268 | */
|
272 | 269 | @Bean
|
273 | 270 | public WebSessionIdResolver webSessionIdResolver() {
|
274 |
| - CookieWebSessionIdResolver resolver = new CookieWebSessionIdResolver(); |
275 |
| - // Setting the max age to 30 days so that the cookie doesn't expire on browser close |
276 |
| - // If the max age is not set, some browsers will default to deleting the cookies on session close. |
277 |
| - resolver.setCookieMaxAge(Duration.of(30, DAYS)); |
278 |
| - resolver.addCookieInitializer((builder) -> builder.path("/")); |
279 |
| - resolver.addCookieInitializer((builder) -> builder.sameSite("Lax")); |
280 |
| - return resolver; |
| 271 | + return new CustomCookieWebSessionIdResolver(); |
281 | 272 | }
|
282 | 273 |
|
283 | 274 | private User createAnonymousUser() {
|
|
0 commit comments