From 42aae42b592c56e1df7303cf56e8da5f66953b13 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Thu, 14 Mar 2024 13:58:43 +0100 Subject: [PATCH] Use https client only when the protocol is set to https: --- packages/node/src/BacktraceNodeRequestHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node/src/BacktraceNodeRequestHandler.ts b/packages/node/src/BacktraceNodeRequestHandler.ts index 7364fcbb..78ce72e8 100644 --- a/packages/node/src/BacktraceNodeRequestHandler.ts +++ b/packages/node/src/BacktraceNodeRequestHandler.ts @@ -142,7 +142,7 @@ export class BacktraceNodeRequestHandler implements BacktraceRequestHandler { } private getHttpClient(submissionUrl: URL) { - return submissionUrl.protocol === 'http' ? http : https; + return submissionUrl.protocol === 'https:' ? https : http; } private createFormData(json: string, attachments?: BacktraceAttachment[]) { const formData = new FormData();