kunsi-pleroma-cybert-media #32

Merged
kunsi merged 16 commits from kunsi-pleroma-cybert-media into main 2021-02-20 21:07:14 +00:00
Showing only changes of commit b470fddc12 - Show all commits

View file

@ -35,5 +35,24 @@ http {
'' close; '' close;
} }
# GDPR compatible IP smashinator 5000000
map $remote_addr $ip_anonym1 {
default 0.0.0;
"~(?P<ip>(\d+)\.(\d+))\.(\d+)\.\d+" $ip;
"~(?P<ip>[^:]+:[^:]+):" $ip;
}
map $remote_addr $ip_anonym2 {
default .0.0;
"~(?P<ip>(\d+)\.(\d+)\.(\d+))\.\d+" .0.0;
"~(?P<ip>[^:]+:[^:]+):" ::;
}
map $ip_anonym1$ip_anonym2 $ip_anonymized {
default 0.0.0.0;
"~(?P<ip>.*)" $ip;
}
log_format gdpr '$ip_anonymized - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"<stripped>" "$http_user_agent"';
include /etc/nginx/sites/*; include /etc/nginx/sites/*;
} }