--- loncom/auth/lonlogin.pm 2019/08/01 14:21:37 1.158.2.8 +++ loncom/auth/lonlogin.pm 2019/08/04 12:18:44 1.158.2.9 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.158.2.8 2019/08/01 14:21:37 raeburn Exp $ +# $Id: lonlogin.pm,v 1.158.2.9 2019/08/04 12:18:44 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -76,15 +76,19 @@ sub handler { &Apache::lonlocal::get_language_handle($r); &Apache::loncommon::content_type($r,'text/html'); if ($expirepub) { - my $c = new CGI::Cookie(-name => 'lonID', + my $c = new CGI::Cookie(-name => 'lonPubID', -value => '', -expires => '-10y',); $r->header_out('Set-cookie' => $c); } elsif (($handle eq '') && ($userdom ne '')) { - my $c = new CGI::Cookie(-name => 'lonID', - -value => '', - -expires => '-10y',); - $r->headers_out->add('Set-cookie' => $c); + my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); + foreach my $name (keys(%cookies)) { + next unless ($name =~ /^lon(|S|Link|Pub)ID$/); + my $c = new CGI::Cookie(-name => $name, + -value => '', + -expires => '-10y',); + $r->headers_out->add('Set-cookie' => $c); + } } $r->send_http_header; return OK if $r->header_only;