vhost: Allow setting proxy headers

This commit is contained in:
uumas
2025-04-05 04:38:14 +03:00
parent d9f8733c39
commit 3cd66c54a7
4 changed files with 16 additions and 1 deletions

View File

@@ -33,7 +33,10 @@
{% for header in location.proxy_delete_headers %}
header_up -{{ header }}
{% endfor %}
{% if not location.proxy_pass_host_header %}
{% for header in location.proxy_headers | dict2items %}
header_up {{ header.key }} `{{ header.value }}`
{% endfor %}
{% if (not location.proxy_pass_host_header) and ('host' not in location.proxy_headers | map('lower')) %}
header_up Host {upstream_hostport}
{% endif %}
}