Skip to content

How to update cookies in FromRequestParts? #3201

Answered by Turbo87
alemandev asked this question in Q&A
Discussion options

You must be logged in to vote

Is there a way to update cookies within a FromRequestParts impl, given that the updated jar cannot be returned?

AFAIK the short answer is: no

the longer answer is: you can use a middleware roughly like https://github.com/rust-lang/crates.io/blob/bb0b971b2fe1474849f109bffd93b2fbfb2862c0/crates/crates_io_session/src/lib.rs#L44-L72

Replies: 1 comment 1 reply

Comment options

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

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