Gossamer Forum
Home : Products : Gossamer Links : Discussions :

make cookie expire after longer time

Quote Reply
make cookie expire after longer time
what do i add to make this work - as in expire in 30 days and require a relogin

thanks

in authenticate
my $session_cookie = $IN->cookie ( -name => 's', -value => $session_id, -path => '/' );

in page.cgi
if (! $USER) {
print $IN->redirect( Links::redirect_login_url ('page') );
return;
}

Quote Reply
Re: make cookie expire after longer time In reply to
This may work....

my $session_cookie = $IN->cookie ( -name => 's', -value => $session_id, -path => '/', -expires => VALUE );



Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: make cookie expire after longer time In reply to
I added -expires => '+1y' (my goal is 30 days)

and it logs in - however i try to access page.cgi again and it pushes me back to user.cgi to login again