[dancer-users] Dancer2 sessions and cookies?
Gabor Szabo
gabor at szabgab.com
Thu Oct 24 12:29:12 BST 2013
I am trying to add sessions to my new Dancer2 based applications and
it drives me crazy as usual.
In config.yml I added
session: YAML
in my login route I added
session last_seen => time;
Running the applications using
plackup -L Shotgun bin/app.pl
and accessing it via http://localhost:5000/
(though I get the same behaviour with perl bin/app.pl as well)
after I pass the login route I see a new yml file created in the sessions/
directory but when I check my browser I don't see any cookies from
localhost and when the code checks in the next get request
if (session('last_seen'))
it is false.
My understanding is that Dancer should set a cookie with the id of the
session which is the name of the yml file in the sessions/ directory.
What do I need to configure in order to get this working?
Gabor
More information about the dancer-users
mailing list