javascript - Can you set the Host header using fetch API -


i have reverse proxy server, redirects different services depending on host header. when making requests server using browser, host set domain name in url. tried:

fetch("http://foo.com", {"headers":{"host":"bar.foo.com"}}) 

but doesn't work

host 1 of forbidden header names:

a forbidden header name http header name cannot modified programmatically.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -