Skip to content

Commit bd3837c

Browse files
committed
Add the heading row to vwf.log
1 parent 5224bc9 commit bd3837c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cgi-bin/page.fcgi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ sub doit
294294
# Check and increment request count
295295
my $request_count = $rate_limit_cache->get($client_ip) || 0;
296296

297+
if(!-r $vwflog) {
298+
# First run - put in the heading row
299+
open(my $log, '>', $vwflog);
300+
print $log '"domain_name","time","IP","country","type","language","http_code","template","args","warnings","error"',
301+
"\n";
302+
close $log;
303+
}
304+
297305
# Rate limit by IP
298306
unless(grep { $_ eq $client_ip } @rate_limit_trusted_ips) { # Bypass rate limiting
299307
if($request_count >= $MAX_REQUESTS) {

0 commit comments

Comments
 (0)