Workers request.headers.set('Host', 'something') not work

workers request.headers.set(‘Host’, ‘something’) not work

only use this way:
let url = someUrl
url = new URL(url)
url.hostname = someHost
new Request(url, request)

but, how to specify a different http header host, instead host in url?

You cant. Cloudflare wont let you do this.

1 Like