Fork me on GitHub

Hey! I'm looking into sessions with ring, and can't get the cookie and session middleware to play nice together. Especially when using a custom cookie encoder/decoder. The session middleware will set the :cookies-key preventing the cookie middleware from decoding the cookies. If I switch the session / cookies middleware around the cookies are decoded properly, but the session cookie won't be read using the correct encoder/decoder. I believe this is because the session-middleware calls the cookies/cookies-request and cookies/cookies-response functions instead of relying on the stack to do these calls. Should I change my approach? If so; how should I do it ?


Removing the direct calls to the cookies-middleware in the sessions-middleware results in the intented behaviour; Which is both the session and the 'other' cookies being encoded and decoded using the setup encoder and decoder.


Can you open an issue for this? It looks like an interaction that wasn’t considered.


Sorry for the delay, but the issue has been filed 🙂 including a repro