This commit is contained in:
Mateusz Gruszczyński committed 2026-11-16 21:06:27 +01:00
1 parent 6fe2aa137b
commit a977cf78a5
18 files changed
+182 -19

No files matched your search

+5 -5
View File
@@ -354,14 +354,14 @@ function load(value = defaults(), migrationIds = [], show = true) {
vhostAutoCertificate = window.rustProxyAutoCertificate.attach(selector, { auto: !editing, anchor: certificateRow, hosts: () => { try { return readHosts(); } catch { return []; } }, certificates: () => [...(envelope?.config.tls?.certificates || []), ...stagedCertificates] }); vhostAutoCertificate.refresh();
certificateRow.append(button("certManage", async () => { if (!(await closeEditor())) return; setPanel("tls"); }));
note(g, "certSelectHint");
const mismatch = field(g, "allow-certificate-mismatch", "vhCertificateMismatchForce", value.allow_certificate_mismatch === true, "checkbox");
const mismatch = field(g, "allow-certificate-mismatch", "vhCertificateMismatchForce", value.allow_certificate_mismatch === true, "checkbox", { switch: true });
const mismatchHint = note(g, "vhCertificateMismatchWarning");
const syncMismatch = () => { mismatch.disabled = !selector.value; if (!selector.value) mismatch.checked = false; mismatchHint.hidden = !mismatch.checked; };
selector.addEventListener("change", syncMismatch); mismatch.addEventListener("change", syncMismatch); syncMismatch();
g = group("vhSslSettings");
const inheritedTlsPolicy = envelope?.config.tls?.policy || { tls12: true, tls13: true, cipher_suites: [] };
const tlsPolicy = value.tls_policy || inheritedTlsPolicy;
const customTlsPolicy = field(g, "tls-policy-custom", "vhTlsOverride", value.tls_policy != null, "checkbox", { switch: true });
const customTlsPolicy = field(g, "tls-policy-custom", "vhTlsOverride", value.tls_policy != null, "checkbox", { switch: true }); customTlsPolicy.closest("label")?.classList.add("vh-wide");
const tls12 = field(g, "tls-policy-12", "tls12", tlsPolicy.tls12 !== false, "checkbox", { switch: true });
const tls13 = field(g, "tls-policy-13", "tls13", tlsPolicy.tls13 !== false, "checkbox", { switch: true });
const tlsCiphers = field(g, "tls-policy-ciphers", "tlsCiphers", (tlsPolicy.cipher_suites || []).join("\n"), "textarea", { rows: 7, maxLength: 8192 });
@@ -381,7 +381,7 @@ function load(value = defaults(), migrationIds = [], show = true) {
const loginUrl = field(taPrimary, "auth-login", "taLogin", auth.login_url || "", "url", { maxLength: 2048 });
authUrl.placeholder = "http://10.87.7.99:3000"; loginUrl.placeholder = "https://auth.example.com/login";
const taOptions = el("div", undefined, "vh-wide auth-provider-options"); taPrimary.append(taOptions);
field(taOptions, "auth-private", "vhPrivate", auth.allow_private, "checkbox");
field(taOptions, "auth-private", "vhPrivate", auth.allow_private, "checkbox", { switch: true });
field(taOptions, "auth-redirect-forbidden", "taRedirectForbidden", auth.redirect_forbidden !== false, "checkbox", { switch: true });
note(taBody, "taHelp");
@@ -408,7 +408,7 @@ function load(value = defaults(), migrationIds = [], show = true) {
login.placeholder = "https://auth.example.com";
}
const options = el("div", undefined, "vh-wide auth-provider-options"); primary.append(options);
field(options, `${id}-private`, "vhPrivate", current.allow_private, "checkbox");
field(options, `${id}-private`, "vhPrivate", current.allow_private, "checkbox", { switch: true });
field(options, `${id}-redirect-forbidden`, "taRedirectForbidden", current.redirect_forbidden === true, "checkbox", { switch: true });
note(body, id === "authelia" ? "autheliaHelp" : "authentikHelp");
const advanced = el("details", undefined, "vh-wide auth-advanced"); advanced.append(text("summary", "forwardAuthAdvanced"));
@@ -441,7 +441,7 @@ function load(value = defaults(), migrationIds = [], show = true) {
oidcSession.autocomplete = "new-password";
const oidcScopes = field(oidcPrimary, "oidc-scopes", "oidcScopes", oidc.scopes || "openid profile email", "text", { maxLength: 1024 });
const oidcOptions = el("div", undefined, "vh-wide auth-provider-options"); oidcPrimary.append(oidcOptions);
field(oidcOptions, "oidc-private", "vhPrivate", oidc.allow_private === true, "checkbox");
field(oidcOptions, "oidc-private", "vhPrivate", oidc.allow_private === true, "checkbox", { switch: true });
note(oidcBody, "oidcHelp");
const oidcAdvanced = el("details", undefined, "vh-wide auth-advanced"); oidcAdvanced.append(text("summary", "forwardAuthAdvanced"));
const oidcAdvancedGrid = el("div", undefined, "vh-grid"); oidcAdvanced.append(oidcAdvancedGrid); oidcBody.append(oidcAdvanced);