We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e29ae1f commit 2adcf4aCopy full SHA for 2adcf4a
server/utils/github.ts
@@ -19,12 +19,13 @@ export async function fetchGitHubWithRetries<T>(
19
20
for (let attempt = 0; attempt < maxAttempts; attempt += 1) {
21
try {
22
+ const headers = new Headers(defaultHeaders)
23
+ for (const [key, value] of new Headers(fetchOptions.headers)) {
24
+ headers.set(key, value)
25
+ }
26
const response = await $fetch.raw(url, {
27
...fetchOptions,
- headers: {
- ...defaultHeaders,
- ...fetchOptions.headers,
- },
28
+ headers,
29
})
30
31
if (response.status === 200) {
0 commit comments