Skip to content

Commit 7a148d5

Browse files
committed
Update proxy-agent usage
1 parent 1d525ce commit 7a148d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/node/update.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ export class UpdateProvider {
104104
const request = (uri: string): void => {
105105
logger.debug("Making request", field("uri", uri))
106106
const isHttps = uri.startsWith("https")
107-
const agent = httpProxyUri ? new ProxyAgent(httpProxyUri) : undefined
107+
const agent = new ProxyAgent({
108+
getProxyForUrl: () => httpProxyUri || "",
109+
})
108110
const httpx = isHttps ? https : http
109111
const client = httpx.get(uri, { headers: { "User-Agent": "code-server" }, agent }, (response) => {
110112
if (!response.statusCode || response.statusCode < 200 || response.statusCode >= 400) {

0 commit comments

Comments
 (0)