[dancer-users] Setting a cookie resets the session?
Warren Young
warren at etr-usa.com
Wed Feb 19 23:58:14 GMT 2014
On 2/13/2014 21:59, Warren Young wrote:
> I have a login page POST handler, and I want to remember the login
> parameters for the next attempt:
>
> post '/login' => sub {
> if (handle_login(stuff)) {
> cookie 'myapp' => {
> 'username' => params->{username},
> 'other' => params->{stuff},
> };
For the archives:
I figured out the problem. I had 'session_name' set to 'myapp' in
config.yml, which means my login parameter cookie was overwriting the
session cookie.
I must not have been thinking clearly when I did that, because it's
obvious to me now that they're separate things, with necessarily
different lifetimes.
More information about the dancer-users
mailing list