Move dns.setDefaultResultOrder to server.js top-level
The DNS ipv4first setting must be applied before any module loads the https/http modules. When set inside cardApi.js helper, it's too late — the https module has already cached DNS resolution behavior. Moving it to the very top of server.js ensures it takes effect globally for all outbound connections.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
// CVE Management Backend API
|
||||
// Install: npm install express pg multer cors dotenv bcryptjs cookie-parser
|
||||
|
||||
// Force IPv4-first DNS resolution globally — must be set before any network modules load.
|
||||
// card.charter.com has IPv6 AAAA records that are unreachable from this network.
|
||||
require('dns').setDefaultResultOrder('ipv4first');
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
const express = require('express');
|
||||
|
||||
Reference in New Issue
Block a user