www/caddy: Caddy dyndns wildcard domain fix (#3989)

- wildcard domains like "*.example.com" need the following dns update:
example.com *
- base domains like "example.com" need the following dns update:
example.com @
This commit is contained in:
Monviech 2024-05-21 16:34:19 +02:00 committed by GitHub
parent 9cf5ea1346
commit f3532fc9d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -26,6 +26,10 @@ DOC: https://docs.opnsense.org/manual/how-tos/caddy.html
Plugin Changelog
================
1.5.6
* Fix: Wildcard domains with activated "Dynamic DNS" update their base domain with * instead of @.
1.5.5
* Fix: "Apply" could hang when websockets are in use by clients. A grace period of 10s has been added in General Settings that forces to close all connections on config changes.

View file

@ -123,7 +123,11 @@
{% for reverse in helpers.toList('Pischem.caddy.reverseproxy.reverse') %}
{% if reverse.enabled|default("0") == "1" and reverse.DynDns|default("0") == "1" %}
{% set cleanedDomain = reverse.FromDomain | replace("*.","") %}
{% do dynDnsDomains.append(cleanedDomain + " @") %}
{% if reverse.FromDomain.startswith("*.") %}
{% do dynDnsDomains.append(cleanedDomain + " *") %}
{% else %}
{% do dynDnsDomains.append(cleanedDomain + " @") %}
{% endif %}
{% endif %}
{% for subdomain in helpers.toList('Pischem.caddy.reverseproxy.subdomain') %}