sysinfo: add interface to get IPv6 address
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@ async function verifyDnsConfig(domainObject) {
|
||||
if (error2 && error2.code === 'ENOTFOUND') throw new BoxError(BoxError.BAD_FIELD, `Unable to resolve ${fqdn}`, { field: 'nameservers' });
|
||||
if (error2 || !result) throw new BoxError(BoxError.BAD_FIELD, error2 ? error2.message : `Unable to resolve ${fqdn}`, { field: 'nameservers' });
|
||||
|
||||
const [error3, ip] = await safe(sysinfo.getServerIp());
|
||||
const [error3, ip] = await safe(sysinfo.getServerIPv4());
|
||||
if (error3) throw new BoxError(BoxError.EXTERNAL_ERROR, `Failed to detect IP of this server: ${error3.message}`);
|
||||
|
||||
if (result.length !== 1 || ip !== result[0]) throw new BoxError(BoxError.EXTERNAL_ERROR, `Domain resolves to ${JSON.stringify(result)} instead of ${ip}`);
|
||||
|
||||
Reference in New Issue
Block a user