Fix CARD production timeout with dns.setDefaultResultOrder('ipv4first')
The family:4 option on individual requests wasn't sufficient.
Node.js 18 needs dns.setDefaultResultOrder('ipv4first') called
at module load time to prevent IPv6 resolution attempts to
card.charter.com which is unreachable via IPv6 from this network.
This commit is contained in:
@@ -9,6 +9,11 @@
|
||||
|
||||
const https = require('https');
|
||||
const http = require('http');
|
||||
const dns = require('dns');
|
||||
|
||||
// Force IPv4-first DNS resolution — card.charter.com has both IPv4 and IPv6
|
||||
// records but IPv6 is unreachable from this network, causing timeouts.
|
||||
dns.setDefaultResultOrder('ipv4first');
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Configuration — read from process.env at module load
|
||||
|
||||
Reference in New Issue
Block a user