From fb780887e3638cc7fb053f7d165250918ee448ed Mon Sep 17 00:00:00 2001 From: Qubasa Date: Wed, 17 Apr 2024 12:55:06 +0200 Subject: [PATCH 1/2] web01: Filter out matrix-org user agent --- modules/web01/goaccess.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/web01/goaccess.nix b/modules/web01/goaccess.nix index b8c5186..694bafb 100644 --- a/modules/web01/goaccess.nix +++ b/modules/web01/goaccess.nix @@ -9,6 +9,7 @@ let # List of browsers and their categories # e.g., WORD delimited by tab(s) \t TYPE # TYPE can be any type and it's not limited to the ones below. + matrix-org Matrix-Preview github-actions-checkout GitHubActions git Git connect-go Go From f45621463db1f4923514f6abd9ac12d48a6a49a7 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Wed, 17 Apr 2024 13:14:52 +0200 Subject: [PATCH 2/2] web01: Filter out Slack user agents --- modules/web01/goaccess.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/modules/web01/goaccess.nix b/modules/web01/goaccess.nix index 694bafb..4da41fc 100644 --- a/modules/web01/goaccess.nix +++ b/modules/web01/goaccess.nix @@ -6,15 +6,16 @@ let pub_goaccess = "/var/www/goaccess"; user-agent-list = pkgs.writeText "browsers.list" '' - # List of browsers and their categories - # e.g., WORD delimited by tab(s) \t TYPE - # TYPE can be any type and it's not limited to the ones below. - matrix-org Matrix-Preview - github-actions-checkout GitHubActions - git Git - connect-go Go - Go-http-client Go - curl Curl + # List of browsers and their categories + # e.g., WORD delimited by tab(s) \t TYPE + # TYPE can be any type and it's not limited to the ones below. + matrix Matrix-Preview + slack Slack + github-actions-checkout GitHubActions + git Git + connect-go Go + Go-http-client Go + curl Curl ''; in { @@ -42,7 +43,9 @@ in # https://raw.githubusercontent.com/allinurl/goaccess/master/config/browsers.list systemd.services.goaccess = { description = "GoAccess server monitoring"; - + preStart = '' + rm -f ${pub_goaccess}/index.html + ''; serviceConfig = { User = "goaccess"; Group = "nginx";