Skip to content

Commit

Permalink
fix: handle case when connection header is not presented in the request
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-tkachenko committed Nov 28, 2023
1 parent 21bab59 commit 7d3d2da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handlers/HttpProxyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class HttpProxyHandler {
proxyConfiguration?.proxyRequestHeaders,
);

const isKeepAliveRequest = req.headers.connection.toLowerCase() === 'keep-alive';
const isKeepAliveRequest = req.headers.connection && req.headers.connection.toLowerCase() === 'keep-alive';
const options: RequestOptions = {
method,
host,
Expand Down

0 comments on commit 7d3d2da

Please sign in to comment.