Skip to content
Discussion options

You must be logged in to vote

The response you create with Redirect::to("/login").into_response() is a completely new response that doesn't know anything about the corresponding request, so it wont have any extensions.

Shoulds like you're looking for a middleware https://docs.rs/axum/latest/axum/middleware/fn.from_fn.html

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@michaelmerrill
Comment options

Answer selected by michaelmerrill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants