Conversation
…ING_SECURITY_SAVED_REQUEST attribute
9e146fe to
debf068
Compare
cmangeat
approved these changes
Sep 29, 2025
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
github-actions bot
added a commit
that referenced
this pull request
Sep 29, 2025
[2.0.x] Merge pull request #226 from georchestra/add-redirect-attribute
pmauduit
reviewed
Oct 7, 2025
Member
pmauduit
left a comment
There was a problem hiding this comment.
Something I don't get: is it enough to just save the parameter in GET to the session attributes using the SPRING_SECURITY_SAVED_REQUEST key ? Where would the actual redirection to the expected page take place ?
We don't need to explicitely instanciate a WebSessionServerRequestCache as pointed in the PR description ?
|
|
||
| The Gateway allows redirection with a query parameter on login page to URLs specified in the `gateway.yaml` file. | ||
|
|
||
| It's a startWith match, so you can specify a whole path or just the beginning of it. |
Member
a one is instanciated somewhere probably by spring, no need to explicitely create it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use SPRING_SECURITY_SAVED_REQUEST key attribute to set redirect URI when using an url like
/login?redirect=myurlhttps://github.com/spring-projects/spring-security/blob/main/web/src/main/java/org/springframework/security/web/server/savedrequest/WebSessionServerRequestCache.java#L55