www/caddy: Fix add handler command causing all domain and subdomain selections being cleared sometimes (#4748)

This commit is contained in:
Monviech
2025-06-11 09:09:45 +02:00
committed by GitHub
parent 2da22da18b
commit bb1721640d
3 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= caddy
PLUGIN_VERSION= 2.0.0
PLUGIN_VERSION= 2.0.1
PLUGIN_DEPENDS= caddy-custom
PLUGIN_COMMENT= Modern Reverse Proxy with Automatic HTTPS, Dynamic DNS and Layer4 Routing
PLUGIN_MAINTAINER= cedrik@pischem.com
+5
View File
@@ -6,6 +6,11 @@ DOC: https://docs.opnsense.org/manual/how-tos/caddy.html
Plugin Changelog
================
2.0.1
Add: Active health checks to handlers (contributed by zaben903) (opnsense/plugins/pull/4721)
Fix: Add handler command sometimes clearing domain selection in open dialogue (opnsense/plugins/pull/4748)
2.0.0
* Attention - Breaking Change: All DNS Providers except Cloudflare have been removed and will not come back (opnsense/plugins/pull/4691)
@@ -394,17 +394,14 @@
// When subdomain is selected in handler show only wildcard domains
$("#handle\\.subdomain").on("change", function () {
const subdomainSelected = $("#handle\\.subdomain").val() !== "";
if (!$(this).val()) {
$("#handle\\.reverse option").show();
} else {
$("#handle\\.reverse option").each(function () {
$(this).toggle($(this).text().includes("*."));
});
$("#handle\\.reverse").find("option").each(function () {
const isWildcard = $(this).text().includes("*.");
$(this).toggle(!subdomainSelected || isWildcard);
});
if (subdomainSelected) {
const selectedText = $("#handle\\.reverse").find("option:selected").text();
if (!selectedText.includes("*.")) {
// Clear selection if not a wildcard
if (!$("#handle\\.reverse option:selected").text().includes("*.")) {
$("#handle\\.reverse").val("").change();
}
}