Skip to content

Commit

Permalink
fix: UA 缺失的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
weaigc committed Sep 15, 2023
1 parent 532df35 commit f5e18d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export function createHeaders(cookies: Partial<{ [key: string]: string }>, type?
...cookies,
})
headers['x-forwarded-for'] = BING_IP || randomIP()
headers['user-agent'] = parseUA(headers['user-agent'])
headers['x-ms-useragent'] = headers['x-ms-useragent'] || 'azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.10.3 OS/Win32'
return headers
}
Expand Down

0 comments on commit f5e18d7

Please sign in to comment.