Skip to content

Commit 19dad16

Browse files
itai-codefreshziv-codefresh
authored andcommitted
Add user agent header (#97)
1 parent 7a3e653 commit 19dad16

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/logic/api/helper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ const sendHttpRequest = async (httpOptions, authContext) => {
1212
finalAuthContext = authContext;
1313
}
1414

15-
const finalOptions = _.assignIn(httpOptions, finalAuthContext.prepareHttpOptions(), { json: true });
15+
const finalOptions = _.merge(
16+
httpOptions,
17+
finalAuthContext.prepareHttpOptions(),
18+
{ json: true, headers: { 'User-Agent': 'codefresh-cli' } },
19+
);
1620
debug('Sending http request:\n%O', finalOptions);
1721
let response;
1822
try {

0 commit comments

Comments
 (0)