From 85f1b12f11341577daf862ef9b245b9f55845cc2 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Tue, 19 Nov 2024 14:30:32 +0200 Subject: [PATCH] Fix to exclude from logging --- authentic-lib.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/authentic-lib.pl b/authentic-lib.pl index 7a59d0960..c2bfc8019 100644 --- a/authentic-lib.pl +++ b/authentic-lib.pl @@ -1870,7 +1870,7 @@ sub init_type sub init { - # Don't log XHR requests + # Don't log XHR requests (exclude from logs) my %tmp_miniserv; get_miniserv_config(\%tmp_miniserv); my $nolog = quotemeta('/stats.cgi?xhr-stats=general'); @@ -1880,6 +1880,13 @@ sub init put_miniserv_config(\%tmp_miniserv); reload_miniserv(); } + my $webpref = "$theme_webprefix/"; + my $nologerr = "${webpref}404.cgi ${webpref}403.cgi ${webpref}401.cgi"; + if ($tmp_miniserv{'nolog'} ne $nologerr) { + $tmp_miniserv{'nolog'} = $nologerr; + put_miniserv_config(\%tmp_miniserv); + reload_miniserv(); + } # Make sure that config directory exists theme_make_config_dir();