fix: www or not-www, that's the question
This commit is contained in:
parent
84b4cc5d54
commit
6462982d12
@ -200,14 +200,20 @@ export async function generateSSLCerts() {
|
|||||||
}
|
}
|
||||||
for (const ssl of ssls) {
|
for (const ssl of ssls) {
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
if (certificates.includes(ssl.domain)) {
|
if (
|
||||||
|
certificates.includes(ssl.domain) ||
|
||||||
|
certificates.includes(ssl.domain.replace('www', ''))
|
||||||
|
) {
|
||||||
console.log(`Certificate for ${ssl.domain} already exists`);
|
console.log(`Certificate for ${ssl.domain} already exists`);
|
||||||
} else {
|
} else {
|
||||||
console.log('Generating SSL for', ssl.domain);
|
console.log('Generating SSL for', ssl.domain);
|
||||||
await letsEncrypt(ssl.domain, ssl.id, ssl.isCoolify);
|
await letsEncrypt(ssl.domain, ssl.id, ssl.isCoolify);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (certificates.includes(ssl.domain)) {
|
if (
|
||||||
|
certificates.includes(ssl.domain) ||
|
||||||
|
certificates.includes(ssl.domain.replace('www', ''))
|
||||||
|
) {
|
||||||
console.log(`Certificate for ${ssl.domain} already exists`);
|
console.log(`Certificate for ${ssl.domain} already exists`);
|
||||||
} else {
|
} else {
|
||||||
console.log('Generating SSL for', ssl.domain);
|
console.log('Generating SSL for', ssl.domain);
|
||||||
|
Loading…
Reference in New Issue
Block a user