1
0

Compare commits

..

1 Commits

Author SHA1 Message Date
78c442bdba conf: misc defaults 2025-06-19 11:36:09 +03:00
6 changed files with 0 additions and 28 deletions

View File

@@ -1,5 +0,0 @@
{%- set hdr = j2cfg.headers.real_ip_from or 'off' -%}
{%- if hdr != 'off' %}
real_ip_header {{ hdr | http_header }};
{% include 'realip-set-from.j2inc' %}
{%- endif %}

View File

@@ -1 +0,0 @@
server_tokens off;

View File

@@ -1 +0,0 @@
{% include 'realip-set-from.j2inc' %}

View File

@@ -1,8 +0,0 @@
{%- set src = (j2cfg.trusted_sources or []) | any_to_str_list | uniq_str_list | ngx_esc -%}
{%- if src %}
{%- for s in src %}
set_real_ip_from {{ s }};
{%- endfor %}
{%- else %}
set_real_ip_from unix: ;
{%- endif %}

View File

@@ -1 +0,0 @@
{% include 'realip-set-from.j2inc' %}

View File

@@ -58,15 +58,3 @@ tls:
dhparam: tls/dh1024.pem
session_tickets: off
session_timeout: 1d
## well-known values are:
## - 'off' - don't use "realip" module
## - 'proxy_protocol' - get information from PROXY protocol if listen directive has "proxy_protocol" option
## - 'X-Forwarded-For' - get information from 'X-Forwarded-For' header
## - 'X-Real-IP' - get information from 'X-Real-IP' header
## any other value will be treated as uncommon (but valid?) header
real_ip_from: off
## list of trusted sources to be used in "realip" module
## ref: https://en.angie.software/angie/docs/configuration/modules/http/http_realip/
## if empty, defaults to "unix:"
trusted_sources: []