mirror of
https://github.com/zen-browser/www.git
synced 2025-07-07 17:05:32 +02:00
fix(githubChecksums): conditionally include Authorization header for GitHub API requests
This commit is contained in:
parent
50df285dec
commit
ec6e361d74
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ export async function getChecksums() {
|
||||||
Accept: 'application/vnd.github+json',
|
Accept: 'application/vnd.github+json',
|
||||||
'X-GitHub-Api-Version': '2022-11-28',
|
'X-GitHub-Api-Version': '2022-11-28',
|
||||||
'User-Agent': 'zen-browser-checksum-fetcher',
|
'User-Agent': 'zen-browser-checksum-fetcher',
|
||||||
Authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
|
...(process.env.GITHUB_TOKEN ? { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` } : {}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if (!res.ok) throw new Error(`Failed to fetch GitHub release: ${res.statusText}`)
|
if (!res.ok) throw new Error(`Failed to fetch GitHub release: ${res.statusText}`)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue