Add support for not passing host header to proxy upstream

This commit is contained in:
uumas
2025-04-05 03:58:48 +03:00
parent 6234c0c459
commit d9f8733c39
4 changed files with 15 additions and 0 deletions

View File

@@ -33,6 +33,9 @@
{% for header in location.proxy_delete_headers %}
header_up -{{ header }}
{% endfor %}
{% if not location.proxy_pass_host_header %}
header_up Host {upstream_hostport}
{% endif %}
}
{% elif location.type == 'redirect' %}
redir * {{ location.redirect_target }}{{ '{path}' if location.redirect_preserve_path }}{{ '?{query}' if location.redirect_preserve_query }} {{ location.redirect_type }}