http: replace startsWith with strict equality · nodejs/node@69b3d2c

Original file line numberDiff line numberDiff line change

@@ -156,7 +156,7 @@ class ProxyConfig {

156156

if (entry === host || entry === hostWithPort) return false; // Matching host and host:port

157157
158158

// Follow curl's behavior: strip leading dot before matching suffixes.

159-

if (entry.startsWith('.')) {

159+

if (entry[0] === '.') {

160160

const suffix = entry.substring(1);

161161

if (host.endsWith(suffix)) return false;

162162

}