From: Yuval Kogman Date: Fri, 4 Nov 2005 22:24:13 +0000 (+0000) Subject: crouchingpenguin's cookie_domain addition to Session::State::Cookie X-Git-Tag: v0.01~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=commitdiff_plain;h=41b4b15cc70693c28297118b695e012ed9089f65 crouchingpenguin's cookie_domain addition to Session::State::Cookie --- diff --git a/lib/Catalyst/Plugin/Session/State/Cookie.pm b/lib/Catalyst/Plugin/Session/State/Cookie.pm index b8dd18c..3382729 100644 --- a/lib/Catalyst/Plugin/Session/State/Cookie.pm +++ b/lib/Catalyst/Plugin/Session/State/Cookie.pm @@ -28,6 +28,10 @@ sub finalize { value => $sid, expires => $c->session->{__expires}, }; + if ( $c->config->{session}{cookie_domain} ) { + $c->response->cookies->{$cookie_name}->{domain} = + $c->config->{session}{cookie_domain}; + } $c->log->debug(qq/A cookie with the session id "$sid" was saved/) if $c->debug; } @@ -100,6 +104,10 @@ Will set the C parameter to it's default value if it isn't set. The name of the cookie to store (defaults to C). +=item cookie_domain + +The name of the domain to store in the cookie (defaults to current host) + =back =head1 SEE ALSO