hyperknot
hyperknot
Explore posts from servers
CDCloudflare Developers
Created by hyperknot on 10/30/2024 in #workers-help
How do I get the list of deployed workers like on the web UI?
With Wrangler, how do I get the list of deployed workers like on the web UI?
4 replies
CDCloudflare Developers
Created by hyperknot on 6/20/2024 in #general-help
R2 down, some buckets are inaccessible
Some public buckets don't work, web UI is also broken for them. "We encountered an internal error. Please try again. (Code: 10001)" Other buckets work.
3 replies
CDCloudflare Developers
Created by hyperknot on 6/9/2024 in #workers-help
Specify host header in fetch request
I'm trying to health-check load balanced hosts, for which I need to fetch using IP address + Host header. In curl it's super simple, like this:
curl -H "Host: direct.openfreemap.org" -I http://144.76.168.195/styles/liberty
curl -H "Host: direct.openfreemap.org" -I http://144.76.168.195/styles/liberty
However I cannot replicate the same in a Worker JS environment. For example this does not work (network connection lost):
const resp = await fetch('http://144.76.168.195/styles/liberty', {
headers: {
Host: 'direct.openfreemap.org',
},
})
const resp = await fetch('http://144.76.168.195/styles/liberty', {
headers: {
Host: 'direct.openfreemap.org',
},
})
How can I make either fetch work with Host headers, or use a lower level library for that?
13 replies