vhost: fix defaults for matchers

This commit is contained in:
uumas
2025-11-22 05:55:56 +02:00
parent d8bd645a80
commit c151a2ee0c
2 changed files with 5 additions and 5 deletions

View File

@@ -10,10 +10,10 @@
{% 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 %}
}

View File

@@ -1,7 +1,7 @@
---
_vhost_matcher_defaults:
match_headers: {}
match_method: []
match_methods: []
_vhost_matchers: >-
{{
vhost_matchers