Uh oh!
There was an error while loading. Please reload this page.
add beforeUpdate hook - #122
Conversation
seanmonstar
commented
May 22, 2017
So, this runs a possible callback when the cookies are serialized? And the reason to do this in your case is to so that the 2 cookies are synchronized, and you don't want to forget to update the plaintext cookie accidentally? Could this also be achieved with another middleware and override |
ponelat
commented
May 23, 2017
@seanmonstar thanks for the prompt response.
I think decorating Hence, I just stuck a callback into client session code. So I could know exactly when |
seanmonstar
commented
May 23, 2017
If the session was dirty, you'll see the |
ponelat
commented
May 23, 2017
@seanmonstar good point! |
Hi,
My use case is to synchronize two cookies, one plaintext and the other a secret.
This hook allows me to update the plaintext cookie, just as the secret one gets updated.
Would love to get this merged, but don't mind alternatives. If any spring to mind.