Skip to content

Commit c6425e3

Browse files
committed
Work around https-proxy-agent ALPN breakage in Node v20
1 parent 26b9150 commit c6425e3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"dependencies": {
164164
"@graphql-tools/schema": "^8.5.0",
165165
"@graphql-tools/utils": "^8.8.0",
166-
"@httptoolkit/httpolyglot": "^2.1.0",
166+
"@httptoolkit/httpolyglot": "^2.1.1",
167167
"@httptoolkit/subscriptions-transport-ws": "^0.11.2",
168168
"@httptoolkit/websocket-stream": "^6.0.1",
169169
"@types/cors": "^2.8.6",

src/server/http-combo-server.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,12 @@ export async function createComboServer(
153153
cert: defaultCert.cert,
154154
ca: [defaultCert.ca],
155155
ALPNProtocols: options.http2 === true
156-
? ['h2', 'http/1.1']
156+
? ['h2', 'http/1.1', 'http 1.1'] // 'http 1.1' is non-standard, but used by https-proxy-agent
157157
: options.http2 === 'fallback'
158-
? ['http/1.1', 'h2']
158+
? ['http/1.1', 'http 1.1', 'h2']
159159
// false
160-
: ['http/1.1'],
160+
: ['http/1.1', 'http 1.1'],
161+
161162
SNICallback: (domain: string, cb: Function) => {
162163
if (options.debug) console.log(`Generating certificate for ${domain}`);
163164

0 commit comments

Comments
 (0)