-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Add more session cookie properties for reactive web servers #26714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more session cookie properties for reactive web servers #26714
Conversation
@weixsun thanks for the PR. I am curious, what lead you to submit this? Are you using this in your own project? |
@snicoll Thank you for your attention.
Yes, this pr is derived from the needs of a microservice module in our actual project. This microservice module does not need to integrate spring-session in its architectural design, so when you want to set the session expiration time and cookie-related attributes , That the way of providing configuration is better than the way of encoding. The advantages of adding these configurations must outweigh the disadvantages. I am not good at words and can only describe the general meaning, but the final result is still determined by experienced spring-boot members. |
I've rebased and squashed all the commits into one so @weixsun please do not push further update for now. I was looking at the current arrangement where we have Before we start duplicating these properties, I'd like to reach out to the team again and verify this is what we want to do. |
Expand the session properties supported by reactive web servers to include `timeout` support and additional `cookie` properties. See gh-26714
Relocate the recently introduced `spring.webflux.session` properties to `server.reactive.session` and create a unified `Cookie` properties class. Reactive session properties now mirror the existing `server.servlet.session` properties and better reflect the fact that they are related to the server and not just for WebFlux. See gh-26714
Thanks very much for your work on this @weixsun, this is now merged this into Thanks again for driving this! |
Am I right that the new properties are not documented? I can see that I could only find a small mention of the new properties in the SB 2.6 Release notes. |
You are right, @DidierLoiseau. Thanks for spotting this. I've opened #31896. |
Add rich session cookie config property for WebFlux
No Session Repository
Provide
spring.webflux.session.cookie.*
properties.Provide
spring.webflux.session.timeout
properties.Integrated spring-session
Make the current
spring.webflux.session.cookie.same-site
configuration items meaningful.spring.webflux.session.cookie.*
properties adaptation spring-sessionspring.webflux.session.timeout
andspring.session.timeout
are equivalent