Replies: 1 comment 7 replies
-
The value of next is based on the request URI, as we can see here. I'm surprised that nesting would affect this and it seems odd that the URI is truncated in that way. I wonder if this is correct behavior for axum. Regardless, this isn't doing what we would want. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I have a route that's inside a nested router, and I use
login_required!
to try to protect it, it will pass along the nested uri as thenext
parameter rather than the full url. For example, with the following untested code snippet:When a person is not logged in and visits
/foo/new
, it sends them to/login?next=%2fnew
, rather than/login?next=%2ffoo%2fnew
. In other words, it is trying to redirect them back to/new
after login rather than/foo/new
. So the nested part of the URL gets lost. Is this supposed to work?Beta Was this translation helpful? Give feedback.
All reactions