mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-28 11:43:03 +00:00
Update placeholder and handle wildcard certs
This commit is contained in:
@@ -2908,7 +2908,7 @@
|
|||||||
"maintenancePageTimeTitle": "Estimated Completion Time (Optional)",
|
"maintenancePageTimeTitle": "Estimated Completion Time (Optional)",
|
||||||
"privateMaintenanceScreenTitle": "Private Placeholder Screen",
|
"privateMaintenanceScreenTitle": "Private Placeholder Screen",
|
||||||
"privateMaintenanceScreenMessage": "This domain is being used on a private resource. Please connect using the Pangolin client to access this resource.",
|
"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",
|
"maintenanceTime": "e.g., 2 hours, Nov 1 at 5:00 PM",
|
||||||
"maintenanceEstimatedTimeDescription": "When you expect maintenance to be completed",
|
"maintenanceEstimatedTimeDescription": "When you expect maintenance to be completed",
|
||||||
"editDomain": "Edit Domain",
|
"editDomain": "Edit Domain",
|
||||||
|
|||||||
@@ -279,7 +279,11 @@ async function syncAcmeCerts(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const cert of resolverData.Certificates) {
|
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) {
|
if (!domain) {
|
||||||
logger.debug(`acmeCertSync: skipping cert with missing domain`);
|
logger.debug(`acmeCertSync: skipping cert with missing domain`);
|
||||||
@@ -309,7 +313,12 @@ async function syncAcmeCerts(
|
|||||||
const existing = await db
|
const existing = await db
|
||||||
.select()
|
.select()
|
||||||
.from(certificates)
|
.from(certificates)
|
||||||
.where(eq(certificates.domain, domain))
|
.where(
|
||||||
|
and(
|
||||||
|
eq(certificates.domain, domain),
|
||||||
|
eq(certificates.wildcard, wildcard)
|
||||||
|
)
|
||||||
|
)
|
||||||
.limit(1);
|
.limit(1);
|
||||||
|
|
||||||
let oldCertPem: string | null = null;
|
let oldCertPem: string | null = null;
|
||||||
@@ -364,7 +373,6 @@ async function syncAcmeCerts(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const wildcard = domain.startsWith("*.");
|
|
||||||
const encryptedCert = encrypt(
|
const encryptedCert = encrypt(
|
||||||
certPem,
|
certPem,
|
||||||
config.getRawConfig().server.secret!
|
config.getRawConfig().server.secret!
|
||||||
|
|||||||
Reference in New Issue
Block a user