Quantcast
Viewing latest article 4
Browse Latest Browse All 26

Answer by Hydrock for I am getting an "Invalid Host header" message when connecting to webpack-dev-server remotely

I solved this problem by adding proxying of the host header in the nginx configuration, like this:

server {    listen 80;    server_name     localhost:3000;    location / {        proxy_pass http://myservice:8080/;        proxy_set_header HOST $host;        proxy_set_header Referer $http_referer;    }}

I added that:

proxy_set_header HOST $host;

proxy_set_header Referer $http_referer;


Viewing latest article 4
Browse Latest Browse All 26

Trending Articles