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=33827299dc2fd48929d1f6058924f89650a404a1;hp=b8dd18ca2961ac774c4680b8af7fe80ad5138ab7;hb=41b4b15cc70693c28297118b695e012ed9089f65;hpb=4e268f19edf34115719e4d7b0765f576863bdb10 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