-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Removed redundant POST request exclusion info #3883
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
Conversation
The default ``ExceptionListener::setTargetPath()`` already excludes POSTs/PUTs, so suggesting that people who implement their own listener to do this is a bit misleading. However, doing this to prevent XMLHttpRequest URIs from being saved is still valuable.
method, the user is redirected to this route only to get a 404 error. | ||
On some occasions, this is unexpected. For example when the last request before logout | ||
was an XMLHttpRequest route, the user may be redirected back to an invalid | ||
route. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like all of this! But, this is actually related to logging in, not logging out:
- I go to a page in my browser and it redirects me to
/login
- While I'm typing in my user/pass, another tab I have open is making an AJAX request, which is being redirected to
/login
(and which is causingsetTargetPath
to be called). - I login, and now I'm redirected to that AJAX URL
So, if you clarify this (i.e. don't talk about logout), we're good! If I'm missing something, please let me know!
Thanks!
@ryancastle can you please take a look at @weaverryan 's comment? |
@wouterj ,@weaverryan Hopefully, this is improved? |
On some occasions, this is unexpected. For example when the last request | ||
URI was an HTTP POST against a route which is configured to allow only a POST | ||
method, the user is redirected to this route only to get a 404 error. | ||
In some situations, this is not ideal. For example when the last request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a comma after "For example".
@xabbuh Comma added! |
Great job Ryan - this is very clean now. Thanks! |
The default
ExceptionListener::setTargetPath()
already excludes POSTs/PUTs, so suggesting that people should implement their own listener to do this is a bit misleading.However, doing this to prevent XMLHttpRequest URIs from being saved is still valuable.