vhost: Support manipulating headers
This commit is contained in:
@@ -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' %}
|
||||
|
||||
Reference in New Issue
Block a user