Skip to content

Commit

Permalink
add keyfile and certfile to request options
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantPSpencer committed Oct 18, 2023
1 parent f81222c commit 9b4e54c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helix-front/server/controllers/d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ interface HelixSession {
type AgentOptions = {
rejectUnauthorized: boolean;
ca?: string;
key?: Buffer;
cert?: Buffer;
};

export type HelixRequestOptions = {
Expand Down
6 changes: 6 additions & 0 deletions helix-front/server/controllers/helix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'] =
Expand Down

0 comments on commit 9b4e54c

Please sign in to comment.