From d3aebeac0c1d8fd1292ae5fb7f51cbe017ccc1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grant=20Pal=C3=A1u=20Spencer?= Date: Thu, 19 Oct 2023 11:57:53 -0700 Subject: [PATCH] add keyfile and certfile to request options (#2672) --- 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 c008fc24804..7314d370512 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 5b7bd300d44..b7d4980c9da 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'] =