From 345790eecd6b2f4745b91999004d921f41b259bc Mon Sep 17 00:00:00 2001 From: Roy Li Date: Wed, 20 Nov 2019 22:21:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=20dns=20=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/dns.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/utils/dns.ts b/lib/utils/dns.ts index 51c73bd54..3c82e90b9 100644 --- a/lib/utils/dns.ts +++ b/lib/utils/dns.ts @@ -9,7 +9,12 @@ const DomainCache = new LRU>({ max: 1000, }); -resolver.setServers(['223.5.5.5', '114.114.114.114', '8.8.8.8', '1.1.1.1']); +// istanbul ignore next +if (process.env.NOW_REGION) { + resolver.setServers(['1.1.1.1', '8.8.8.8']); +} else { + resolver.setServers(['223.5.5.5', '114.114.114.114']); +} export const resolveDomain = async (domain: string): Promise> => { if (DomainCache.has(domain)) {