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

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -