Skip to content

Commit

Permalink
add keyfile and certfile to request options (apache#2672)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantPSpencer authored and zpinto committed Nov 8, 2023
1 parent 809657a commit d3aebea
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 d3aebea

Please sign in to comment.