Merge pull request #4689 from Rotzbua/fix_workaroud_dns

fix(dns): remove outdated node check
This commit is contained in:
Nick O'Leary 2024-05-13 14:41:35 +01:00 committed by GitHub
commit edc5e88d5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,11 +25,9 @@ var api = require("@node-red/editor-api");
var server = null;
var apiEnabled = false;
const NODE_MAJOR_VERSION = process.versions.node.split('.')[0];
if (NODE_MAJOR_VERSION >= 16) {
const dns = require('dns');
dns.setDefaultResultOrder('ipv4first');
}
// Ensure ipv4 results are returned first: https://github.com/node-red/node-red/issues/4010
const dns = require('dns');
dns.setDefaultResultOrder('ipv4first');
function checkVersion(userSettings) {
var semver = require('semver');