vhost: Support manipulating headers

This commit is contained in:
uumas
2024-07-28 00:45:37 +03:00
parent 1dbb9eac4c
commit 3331a96cbc
4 changed files with 37 additions and 3 deletions

View File

@@ -8,6 +8,9 @@
{{ vhost_domains | join(' ') }} {
{% for location in vhost_locations_all %}
handle {{ location.path }} {
{% for header in location.delete_headers %}
header -{{ header }}
{% endfor %}
{% for header in location.headers | dict2items %}
header {{ header.key }} `{{ header.value }}`
{% endfor %}
@@ -26,6 +29,9 @@
}
{% endif %}
}
{% for header in location.proxy_delete_headers %}
request_header -{{ header }}
{% endfor %}
{% elif location.type == 'redirect' %}
redir {{ location.redirect_target }}{{ '{uri}' if location.redirect_preserve_path }} {{ location.redirect_type }}
{% elif location.type == 'respond' %}