Using github repo as User-Agent#1483
Conversation
|
| headers: { | ||
| 'User-Agent': opts.repo, | ||
| ...(opts.token && { Authorization: `Bearer ${opts.token}` }), | ||
| }, |
There was a problem hiding this comment.
I thought of doing this exact same fix actually
emmatown
left a comment
There was a problem hiding this comment.
I imagine we should provide an explicit user agent in other places where we use fetch from the server?
|
|
@emmatown can it be merged ? |
I tried to use keystatic github reader when deployed to Cloudflare but always got 403 error. Turned out, API call to github need a valid User-Agent, but Cloudflare workers is not populate that by default like other runtime.
Fix: #1441