X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FSession%2FState%2FCookie.pm;h=5319500777eee36932d5978945459e48c58d049a;hp=0bef033433cf8dbec9dbe96d6aad6f7295716b89;hb=fc4b9d6d856e4a7571309881c4f7cd4b1d445642;hpb=1e986fd57422a13babc4305f9f95f1d50b71c2cd diff --git a/lib/Catalyst/Plugin/Session/State/Cookie.pm b/lib/Catalyst/Plugin/Session/State/Cookie.pm index 0bef033..5319500 100644 --- a/lib/Catalyst/Plugin/Session/State/Cookie.pm +++ b/lib/Catalyst/Plugin/Session/State/Cookie.pm @@ -44,6 +44,8 @@ sub make_session_cookie { $cookie->{expires}=$c->calc_expiry(); + $cookie->{secure} = 1 if $cfg->{cookie_secure}; + return $cookie; } @@ -153,6 +155,10 @@ Number of seconds from now you want to elapse before cookie will expire. Set to 0 to create a session cookie, ie one which will die when the user's browser is shut down. +=item cookie_secure + +If this attribute set true, the cookie will only be sent via HTTPS. + =back =head1 CAVEATS