Hideo Kimura++'s cookie_secure patch
Yuval Kogman [Wed, 10 May 2006 11:48:29 +0000 (11:48 +0000)]
lib/Catalyst/Plugin/Session/State/Cookie.pm

index 0bef033..5319500 100644 (file)
@@ -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