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