mirror of
https://github.com/google-github-actions/auth.git
synced 2026-06-06 09:17:05 +00:00
Set user-agent header
This commit is contained in:
parent
ad2dddb569
commit
ddb73aed67
1 changed files with 8 additions and 0 deletions
|
|
@ -88,6 +88,14 @@ export class Client {
|
|||
* request.
|
||||
*/
|
||||
static request(opts: RequestOptions, data?: any): Promise<string> {
|
||||
if (!opts.headers) {
|
||||
opts.headers = {};
|
||||
}
|
||||
|
||||
if (!opts.headers['User-Agent']) {
|
||||
opts.headers['User-Agent'] = 'sethvargo:oidc-auth-google-cloud/0.2.1';
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const req = https.request(opts, (res) => {
|
||||
res.setEncoding('utf8');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue