mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
www/caddy: Fix add handler command causing all domain and subdomain selections being cleared sometimes (#4748)
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user