From 3d189694718e979acf9e88d942bf14fee1a89cd5 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Sun, 8 Oct 2023 13:43:04 +0200 Subject: [PATCH] nginx: disable ip anonymizing --- modules/nginx.nix | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/nginx.nix b/modules/nginx.nix index 45cb296..71ab4c8 100644 --- a/modules/nginx.nix +++ b/modules/nginx.nix @@ -9,21 +9,21 @@ recommendedOptimisation = true; recommendedTlsSettings = true; - appendHttpConfig = '' - map $remote_addr $remote_addr_anon { - ~(?P\d+\.\d+\.\d+)\. $ip.0; - ~(?P[^:]+:[^:]+): $ip::; - # IP addresses to not anonymize - 127.0.0.1 $remote_addr; - ::1 $remote_addr; - default 0.0.0.0; - } - log_format anon_ip '$remote_addr_anon - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; + # appendHttpConfig = '' + # map $remote_addr $remote_addr_anon { + # ~(?P\d+\.\d+\.\d+)\. $ip.0; + # ~(?P[^:]+:[^:]+): $ip::; + # # IP addresses to not anonymize + # 127.0.0.1 $remote_addr; + # ::1 $remote_addr; + # default 0.0.0.0; + # } + # log_format anon_ip '$remote_addr_anon - $remote_user [$time_local] "$request" ' + # '$status $body_bytes_sent "$http_referer" ' + # '"$http_user_agent" "$http_x_forwarded_for"'; - access_log /var/log/nginx/access.log anon_ip; - ''; + # access_log /var/log/nginx/access.log anon_ip; + # ''; }; security.acme = { acceptTerms = true;