fix(certificates): resolve base-domain certificate lookups and route profile list inputs
This commit is contained in:
@@ -1076,7 +1076,10 @@ export class DcRouter {
|
||||
if (!expiryDate) {
|
||||
try {
|
||||
const cleanDomain = entry.domain.replace(/^\*\.?/, '');
|
||||
const certDoc = await AcmeCertDoc.findByDomain(cleanDomain);
|
||||
const domParts = cleanDomain.split('.');
|
||||
const baseDomain = domParts.length > 2 ? domParts.slice(-2).join('.') : cleanDomain;
|
||||
const certDoc = await AcmeCertDoc.findByDomain(baseDomain)
|
||||
|| (baseDomain !== cleanDomain ? await AcmeCertDoc.findByDomain(cleanDomain) : null);
|
||||
if (certDoc?.validUntil) {
|
||||
expiryDate = new Date(certDoc.validUntil).toISOString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user