small fix to basephp template (#53)

Co-authored-by: muppeth <muppeth@disroot.org>
Reviewed-on: #53
Reviewed-by: meaz <meaz@no-reply@disroot.org>
This commit is contained in:
muppeth 2023-08-13 03:57:18 +00:00
parent 80dd92a994
commit 49149f7eb5
2 changed files with 9 additions and 17 deletions

View File

@ -10,14 +10,6 @@
try_files {{ item.override_try_files | default('$uri $uri/ =404') }};
}
{% endblock %}
{% block app_root_location %}
{% endblock %}
{% block extra_locations %}
{% endblock %}
{% block custom_locations %}
{% endblock %}
{% block local_content %}
{% if item.manage_local_content is not defined %}

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 }};
#}