Skip to content

Commit

Permalink
Set plain cookies with a domain, too
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Nov 10, 2011
1 parent 0e893ac commit 7ccca7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/NTPPool/Control.pm
Expand Up @@ -246,6 +246,11 @@ sub plain_cookie {
return $ocookie;
}

$args->{domain} = delete $args->{domain}
|| $self->site && $self->config->site->{$self->site}->{cookie_domain}
|| $self->request->uri->host
|| '';

$args->{path} ||= '/';
$args->{expires} = time + ( 30 * 86400 ) unless defined $args->{expires};
if ($args->{expires} =~ m/^-/) {
Expand Down

0 comments on commit 7ccca7e

Please sign in to comment.