initial commit

This commit is contained in:
muppeth 2023-08-10 07:07:54 +02:00
parent 80dd92a994
commit 8b2c1ee168
Signed by: muppeth
GPG Key ID: 0EBC7B9848D04031
1 changed files with 9 additions and 9 deletions

View File

@ -36,9 +36,9 @@ location ~ ^/(api|feeds|nodeinfo|.well-known) {
proxy_set_header Connection "upgrade";
# Rate limit
limit_req zone={{ item.name }}_ratelimit burst=30 nodelay;
#limit_req zone={{ item.name }}_ratelimit burst=30 nodelay;
# Add IP forwarding headers
# Send actual client IP upstream
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@ -75,11 +75,11 @@ location ~ ^/(api|feeds|nodeinfo|.well-known) {
# Anonymize IP addresses
# https://www.supertechcrew.com/anonymizing-logs-nginx-apache/
map $remote_addr $remote_addr_anon {
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
~(?P<ip>[^:]+:[^:]+): $ip::;
127.0.0.1 $remote_addr;
::1 $remote_addr;
default {{ item.upstream_name }};
}
#map $remote_addr $remote_addr_anon {
# ~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
# ~(?P<ip>[^:]+:[^:]+): $ip::;
# 127.0.0.1 $remote_addr;
# ::1 $remote_addr;
# default {{ item.upstream_name }};
#}