From fdf366301382802342c2e8a7e2b1b96bdb882b82 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Thu, 7 Aug 2025 22:14:22 +0800 Subject: [PATCH] http: replace startsWith with strict equality --- lib/internal/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/http.js b/lib/internal/http.js index 4f250a2e70a20f..78010bd8f23512 100644 --- a/lib/internal/http.js +++ b/lib/internal/http.js @@ -150,7 +150,7 @@ class ProxyConfig { if (entry === host || entry === hostWithPort) return false; // Matching host and host:port // Follow curl's behavior: strip leading dot before matching suffixes. - if (entry.startsWith('.')) { + if (entry[0] === '.') { const suffix = entry.substring(1); if (host.endsWith(suffix)) return false; }