I tried to use fetch()
to connect to one of my websites hosted on IPv6 networks only, but it returned:
connect(): Network is unreachable
Code pasted here:
async function handleRequest(request) {
request = new Request(request)
request.headers.set('Host', 'ipv6.google.com')
const URL = 'https://ipv6.google.com'
let response = await fetch(URL, request)
response = new Response(response.body, response)
return response
}
I replaced the URL with https://ipv6.google.com
, which is also hosted on IPv6 networks only. The error still appears.
Is workers backend connected to the IPv6 network? If not, when will the access be available?
Thanks.