Skip to content

Commit 680350f

Browse files
committed
Stash header in the log file
2 parents 9778cb2 + bd3837c commit 680350f

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
@@ -300,6 +300,14 @@ sub doit
300300
$warnings = join(';', @warnings);
301301
}
302302

303+
if(!-r $vwflog) {
304+
# First run - put in the heading row
305+
open(my $log, '>', $vwflog);
306+
print $log '"domain_name","time","IP","country","type","language","http_code","template","args","warnings","error"',
307+
"\n";
308+
close $log;
309+
}
310+
303311
# Rate limit by IP
304312
unless(grep { $_ eq $client_ip } @rate_limit_trusted_ips) { # Bypass rate limiting
305313
if($request_count >= $MAX_REQUESTS) {

0 commit comments

Comments
 (0)