Просмотр исходного кода

update nginx configs for cinny, hydrogen, and synapse reverse proxy companion with ip anonymization

pull/4467/head
Aine 7 месяцев назад
Родитель
Сommit
e8c7091c3f
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 34969C908CCA2804
3 измененных файлов: 27 добавлений и 9 удалений
  1. +9
    -3
      roles/custom/matrix-client-cinny/templates/nginx.conf.j2
  2. +9
    -3
      roles/custom/matrix-client-hydrogen/templates/nginx.conf.j2
  3. +9
    -3
      roles/custom/matrix-synapse-reverse-proxy-companion/templates/nginx/nginx.conf.j2

+ 9
- 3
roles/custom/matrix-client-cinny/templates/nginx.conf.j2 Просмотреть файл

@@ -31,9 +31,15 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
map $remote_addr $remote_addr_anon {
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
~(?P<ip>[^:]+:[^:]+): $ip::;
default 0.0.0.0;
}

log_format main '$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 main;



+ 9
- 3
roles/custom/matrix-client-hydrogen/templates/nginx.conf.j2 Просмотреть файл

@@ -31,9 +31,15 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
map $remote_addr $remote_addr_anon {
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
~(?P<ip>[^:]+:[^:]+): $ip::;
default 0.0.0.0;
}

log_format main '$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 main;



+ 9
- 3
roles/custom/matrix-synapse-reverse-proxy-companion/templates/nginx/nginx.conf.j2 Просмотреть файл

@@ -33,9 +33,15 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
map $remote_addr $remote_addr_anon {
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
~(?P<ip>[^:]+:[^:]+): $ip::;
default 0.0.0.0;
}

log_format main '$remote_addr_anon - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

{% if matrix_synapse_reverse_proxy_companion_access_log_enabled %}
access_log /var/log/nginx/access.log main;


Загрузка…
Отмена
Сохранить