Update placeholder and handle wildcard certs

This commit is contained in:
Owen
2026-04-22 16:48:33 -07:00
parent af5394d464
commit 9d0a8ecb09
2 changed files with 12 additions and 4 deletions

View File

@@ -2908,7 +2908,7 @@
"maintenancePageTimeTitle": "Estimated Completion Time (Optional)",
"privateMaintenanceScreenTitle": "Private Placeholder Screen",
"privateMaintenanceScreenMessage": "This domain is being used on a private resource. Please connect using the Pangolin client to access this resource.",
"privateMaintenanceScreenSteps": "Once connected, if you are still seeing this message your browser's DNS cache may still point to the old address. To fix this: fully close and reopen your browser, then navigate back to this page.",
"privateMaintenanceScreenSteps": "Once connected, if you are still seeing this message your browser's DNS cache may still point to the old address. To fix this: fully close and reopen this tab, or your browser, then navigate back to this page.",
"maintenanceTime": "e.g., 2 hours, Nov 1 at 5:00 PM",
"maintenanceEstimatedTimeDescription": "When you expect maintenance to be completed",
"editDomain": "Edit Domain",

View File

@@ -279,7 +279,11 @@ async function syncAcmeCerts(
}
for (const cert of resolverData.Certificates) {
const domain = cert.domain?.main;
const rawDomain = cert.domain?.main;
const domain = rawDomain.startsWith("*.")
? rawDomain.slice(2)
: rawDomain;
const wildcard = rawDomain.startsWith("*.");
if (!domain) {
logger.debug(`acmeCertSync: skipping cert with missing domain`);
@@ -309,7 +313,12 @@ async function syncAcmeCerts(
const existing = await db
.select()
.from(certificates)
.where(eq(certificates.domain, domain))
.where(
and(
eq(certificates.domain, domain),
eq(certificates.wildcard, wildcard)
)
)
.limit(1);
let oldCertPem: string | null = null;
@@ -364,7 +373,6 @@ async function syncAcmeCerts(
}
}
const wildcard = domain.startsWith("*.");
const encryptedCert = encrypt(
certPem,
config.getRawConfig().server.secret!