Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Commit e3934bd

Browse files
authored
Do not configure proxyAuth when no proxy authentication is provided
1 parent 9dc4079 commit e3934bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ export class HttpClient {
642642
maxSockets: maxSockets,
643643
keepAlive: this._keepAlive,
644644
proxy: {
645-
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`,
645+
...((proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }),
646646
host: proxyUrl.hostname,
647647
port: proxyUrl.port
648648
}

0 commit comments

Comments
 (0)