From: Yuval Kogman Date: Wed, 10 May 2006 11:48:29 +0000 (+0000) Subject: Hideo Kimura++'s cookie_secure patch X-Git-Tag: v0.03~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=commitdiff_plain;h=fc4b9d6d856e4a7571309881c4f7cd4b1d445642;hp=1e986fd57422a13babc4305f9f95f1d50b71c2cd Hideo Kimura++'s cookie_secure patch --- 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