Describe the bugprevious_url does not do the expected behavior when referrer is the current page itself.
Scenario
Let's say you're in /users and you clicked a button that sends a POST request to /users/create which redirects back to /users. The Referrer header would be set as "/users" causing the previous_url to not work as expected.
Describe the bug
previous_url
does not do the expected behavior when referrer is the current page itself.Scenario Let's say you're in
/users
and you clicked a button that sends a POST request to/users/create
which redirects back to/users
. The Referrer header would be set as "/users" causing theprevious_url
to not work as expected.