vhost: Support regex matching paths

This commit is contained in:
uumas
2025-07-19 20:01:34 +03:00
parent cb0817fc54
commit 8af49bcc3e
2 changed files with 10 additions and 4 deletions

View File

@@ -1,7 +1,12 @@
#jinja2: lstrip_blocks: True
{{ vhost_domains | join(' ') }} {
{% for location in _vhost_locations_complete %}
handle {{ location.path }} {
{% if location.path != '' %}
@{{ location.path }} path{{ '_regexp' if location.path.startswith('^') and location.path.endswith('$') else '' }} {{ location.path }}
handle @{{ location.path }} {
{% else %}
handle {
{% endif %}
{% for matcher in location.matchers %}
{% if matcher.name != '' %}
@{{ matcher.name }} {