https-proxy-agent
Advanced tools
Comparing version 6.1.0 to 6.2.0
@@ -93,3 +93,5 @@ "use strict"; | ||
} | ||
const headers = { ...this.proxyHeaders }; | ||
const headers = typeof this.proxyHeaders === 'function' | ||
? this.proxyHeaders() | ||
: { ...this.proxyHeaders }; | ||
const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; | ||
@@ -96,0 +98,0 @@ let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; |
@@ -8,3 +8,3 @@ /// <reference types="node" /> | ||
import * as http from 'http'; | ||
import { OutgoingHttpHeaders } from 'http'; | ||
import type { OutgoingHttpHeaders } from 'http'; | ||
import { Agent, AgentConnectOpts } from 'agent-base'; | ||
@@ -20,3 +20,3 @@ type Protocol<T> = T extends `${infer Protocol}:${infer _}` ? Protocol : never; | ||
export type HttpsProxyAgentOptions<T> = ConnectOpts<T> & http.AgentOptions & { | ||
headers?: OutgoingHttpHeaders; | ||
headers?: OutgoingHttpHeaders | (() => OutgoingHttpHeaders); | ||
}; | ||
@@ -38,3 +38,3 @@ /** | ||
readonly proxy: URL; | ||
proxyHeaders: OutgoingHttpHeaders; | ||
proxyHeaders: OutgoingHttpHeaders | (() => OutgoingHttpHeaders); | ||
connectOpts: net.TcpNetConnectOpts & tls.ConnectionOptions; | ||
@@ -41,0 +41,0 @@ get secureProxy(): boolean; |
@@ -93,3 +93,5 @@ "use strict"; | ||
} | ||
const headers = { ...this.proxyHeaders }; | ||
const headers = typeof this.proxyHeaders === 'function' | ||
? this.proxyHeaders() | ||
: { ...this.proxyHeaders }; | ||
const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; | ||
@@ -96,0 +98,0 @@ let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; |
{ | ||
"name": "https-proxy-agent", | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", | ||
@@ -24,3 +24,3 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"agent-base": "^7.0.1", | ||
"agent-base": "^7.0.2", | ||
"debug": "4" | ||
@@ -38,3 +38,3 @@ }, | ||
"typescript": "^5.0.4", | ||
"proxy": "2.0.1", | ||
"proxy": "2.1.1", | ||
"tsconfig": "0.0.0" | ||
@@ -41,0 +41,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34885
508
Updatedagent-base@^7.0.2