Skip to content

Commit

Permalink
fix(getRequestProtocol): conditionaly check connection?.encrypted (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
michealroberts authored Sep 26, 2023
1 parent 0e65e37 commit 9427e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function getRequestProtocol(
) {
return "https";
}
return (event.node.req.connection as any).encrypted ? "https" : "http";
return (event.node.req.connection as any)?.encrypted ? "https" : "http";
}

const DOUBLE_SLASH_RE = /[/\\]{2,}/g;
Expand Down

0 comments on commit 9427e18

Please sign in to comment.