Skip to content

Commit

Permalink
Fix: Add userAgent to HttpClient (#23)
Browse files Browse the repository at this point in the history
This commit adds a User-Agent header to the HttpClient. Web Application
Firewalls commonly have rules to block http requests missing this
header.
  • Loading branch information
james-gibbons-lark committed Mar 14, 2024
1 parent 9fd2356 commit 5764771
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/terrakube.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const core = __importStar(require("@actions/core"));
const httpm = __importStar(require("@actions/http-client"));
class TerrakubeClient {
constructor(gitHubActionInput) {
this.httpClient = new httpm.HttpClient();
this.httpClient = new httpm.HttpClient("TerrakubeActionGithub");
this.gitHubActionInput = gitHubActionInput;
this.authenticationToken = 'empty';
core.info(`Creating Terrakube CLient....`);
Expand Down
2 changes: 1 addition & 1 deletion src/terrakube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class TerrakubeClient {
private gitHubActionInput: GitHubActionInput;

constructor(gitHubActionInput: GitHubActionInput) {
this.httpClient = new httpm.HttpClient();
this.httpClient = new httpm.HttpClient("TerrakubeActionGithub");
this.gitHubActionInput = gitHubActionInput;
this.authenticationToken = 'empty'

Expand Down

0 comments on commit 5764771

Please sign in to comment.