mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-17 06:24:32 +00:00
Start creating ns one level down
This commit is contained in:
@@ -79,7 +79,7 @@ export async function createCertificate(
|
|||||||
|
|
||||||
let domainToWrite = domain;
|
let domainToWrite = domain;
|
||||||
if (
|
if (
|
||||||
domainRecord.type == "wildcard" &&
|
domainRecord.type == "wildcard" && // this is to fix the wildcard certs for traefik in self hosted NOT ON THE CLOUD
|
||||||
domainRecord.preferWildcardCert &&
|
domainRecord.preferWildcardCert &&
|
||||||
!domain.startsWith("*.")
|
!domain.startsWith("*.")
|
||||||
) {
|
) {
|
||||||
@@ -89,6 +89,16 @@ export async function createCertificate(
|
|||||||
domainToWrite = parts.slice(1).join(".");
|
domainToWrite = parts.slice(1).join(".");
|
||||||
domainToWrite = `*.${domainToWrite}`;
|
domainToWrite = `*.${domainToWrite}`;
|
||||||
}
|
}
|
||||||
|
} else if (domainRecord.type == "ns") {
|
||||||
|
// first if we have a * in the domain for this case we dont want to include it because it will mess with the cert generator so remove it
|
||||||
|
if (domain.startsWith("*.")) {
|
||||||
|
domain = domain.slice(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
const parts = domain.split(".");
|
||||||
|
if (parts.length > 2) {
|
||||||
|
domainToWrite = parts.slice(1).join(".");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// No cert found, create a new one in pending state
|
// No cert found, create a new one in pending state
|
||||||
|
|||||||
Reference in New Issue
Block a user