Send better user-agent values (and got config changes) (#7309)

* expose fetchLimitBytes/userAgent in got-config module

* export a function not a factory

* send better user-agent values

- add userAgentBase setting
- send short SHA in user agent on heroku
- set a version (tag or short SHA) in Dockefile and use
  it to report server version in UA for docker users

* add a comment explaining fileSize

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
chris48s
2021-11-25 17:11:49 +00:00
committed by GitHub
parent 95a439a1cc
commit 99bffd3a86
22 changed files with 113 additions and 54 deletions

View File

@@ -54,7 +54,7 @@ describe('GithubAuthV3Service', function () {
'https://github-api.example.com/repos/badges/shields/check-runs',
{
headers: {
'User-Agent': 'Shields.io/2003a',
'User-Agent': 'shields (self-hosted)/dev',
Accept: 'application/vnd.github.antiope-preview+json',
Authorization: 'token undefined',
},