Mutate Extension (WriteableSession) in Response #1534
Answered
by
davidpdrsn
michaelmerrill
asked this question in
Q&A
-
Is there a way I can access
|
Beta Was this translation helpful? Give feedback.
Answered by
davidpdrsn
Nov 17, 2022
Replies: 1 comment 1 reply
-
The response you create with Shoulds like you're looking for a middleware https://docs.rs/axum/latest/axum/middleware/fn.from_fn.html |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
michaelmerrill
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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