Hi, Is it possible to set a cookie on redirect? I have a "/callback"-route which I want to redirect to "/" and set an cookie. I have wrapped my routes with the wrap-cookies middleware. I return this from my callback-route as a response but it does not work. (Redirect works but not cookie).
{:status 302, :headers {"Location" "/"}, :body "", :cookies {:t {:value "1337"}}}
@jarvinenemil This is not something that all HTTP clients will honor, even if you can get Ring to do it, so I'd be wary of relying on it.
It used to be that some popular browsers ignored cookies on a redirect response. Chromium had a long-standing bug report about this and marked it WontFix / Permanent Bug.
Yeah I found the Chromium bug as well. I'll come up with a different strategy