vhost: fix defaults for matchers
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
{% else %}
|
||||
handle {
|
||||
{% endif %}
|
||||
{% for matcher in location.matchers %}
|
||||
{% for matcher in location.matchers %}
|
||||
{% if matcher.name != '' %}
|
||||
@{{ matcher.name }} {
|
||||
{% if matcher.match_methods | length > 0 %}
|
||||
{% if matcher.match_methods | default([]) | length > 0 %}
|
||||
method {{ matcher.match_methods | join(' ') }}
|
||||
{% endif %}
|
||||
{% for header in matcher.match_headers | dict2items %}
|
||||
{% for header in matcher.match_headers | default({}) | dict2items %}
|
||||
header{{ '_regexp' if header.value.startswith('^') and header.value.endswith('$') else '' }} {{ header.key }} {{ header.value }}
|
||||
{% endfor %}
|
||||
}
|
||||
@@ -79,7 +79,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
}
|
||||
{% endfor %}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
_vhost_matcher_defaults:
|
||||
match_headers: {}
|
||||
match_method: []
|
||||
match_methods: []
|
||||
_vhost_matchers: >-
|
||||
{{
|
||||
vhost_matchers
|
||||
|
||||
Reference in New Issue
Block a user