syncDns: sync secondary dns records
This commit is contained in:
@@ -45,9 +45,9 @@ async function sync(auditSource) {
|
||||
if (app.installationState !== apps.ISTATE_INSTALLED) continue;
|
||||
|
||||
const locations = [{ domain: app.domain, subdomain: app.subdomain }]
|
||||
.concat(app.secondaryDomains.map(sd => { return { domain: sd.domain, subdomain: sd.subdomain }; }))
|
||||
.concat(app.redirectDomains.map(rd => { return { domain: rd.domain, subdomain: rd.subdomain }; }))
|
||||
.concat(app.aliasDomains.map(ad => { return { domain: ad.domain, subdomain: ad.subdomain }; }));
|
||||
.concat(app.secondaryDomains)
|
||||
.concat(app.redirectDomains)
|
||||
.concat(app.aliasDomains);
|
||||
|
||||
for (const location of locations) {
|
||||
if (ipv4Changed) await dns.upsertDnsRecords(location.subdomain, location.domain, 'A', [ ipv4 ]);
|
||||
|
||||
Reference in New Issue
Block a user