Skip to content

Commit

Permalink
Bot would be logged in wwslog()
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedas committed Jun 16, 2023
1 parent 6de13bc commit fbe7f7f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/cgi/wwsympa.fcgi.in
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,9 @@ sub wwslog {
$wwsmsg = "[rss] " . $wwsmsg
if $rss;

$wwsmsg = "[bot] " . $wwsmsg
if $session->{'is_a_crawler'};

$wwsmsg = "[client $remote] " . $wwsmsg
if $remote;

Expand Down Expand Up @@ -8554,13 +8557,12 @@ sub do_arc {
$param->{'file'} = $archive->{arc_directory} . '/' . $in{'arc_file'};
}

$param->{'date'} = Sympa::Tools::File::get_mtime(
$archive->{arc_directory} . '/' . $in{'arc_file'});
# send page as static if client is a bot. That's prevent crawling all
# archices every weeks by google, yahoo and others bots
if ($session->{'is_a_crawler'}) {
$param->{'header_date'} = $param->{'date'};
}
# Send page as static if client is a bot. That prevent crawling all
# archives every week by Google, Yahoo and other bots.
$param->{'header_date'} =
Sympa::Tools::File::get_mtime(
$archive->{arc_directory} . '/' . $in{'arc_file'})
if $session->{'is_a_crawler'};
$param->{'archive_name'} = $in{'month'};

#test pour différentier les action d'un robot et d'un simple abonné
Expand Down

0 comments on commit fbe7f7f

Please sign in to comment.