From 9b4e54cf1c7c969425476218fb8d12e51e2ad2ea Mon Sep 17 00:00:00 2001 From: Grant Palau Spencer Date: Tue, 17 Oct 2023 20:44:50 -0700 Subject: [PATCH] add keyfile and certfile to request options --- helix-front/server/controllers/d.ts | 2 ++ helix-front/server/controllers/helix.ts | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/helix-front/server/controllers/d.ts b/helix-front/server/controllers/d.ts index c008fc2480..7314d37051 100644 --- a/helix-front/server/controllers/d.ts +++ b/helix-front/server/controllers/d.ts @@ -17,6 +17,8 @@ interface HelixSession { type AgentOptions = { rejectUnauthorized: boolean; ca?: string; + key?: Buffer; + cert?: Buffer; }; export type HelixRequestOptions = { diff --git a/helix-front/server/controllers/helix.ts b/helix-front/server/controllers/helix.ts index 5b7bd300d4..b7d4980c9d 100644 --- a/helix-front/server/controllers/helix.ts +++ b/helix-front/server/controllers/helix.ts @@ -59,6 +59,12 @@ export class HelixCtrl { encoding: 'utf-8', }); } + if (SSL.keyfile) { + options.agentOptions.key = readFileSync(SSL.keyfile); + } + if (SSL.certfile) { + options.agentOptions.cert = readFileSync(SSL.certfile); + } if (IDENTITY_TOKEN_SOURCE) { options.headers['Identity-Token'] =