Quantcast
Channel: I am getting an "Invalid Host header" message when connecting to webpack-dev-server remotely - Stack Overflow
Viewing all articles
Browse latest Browse all 26

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

$
0
0

I found out, that I need to set the public property of devServer, to my request's host value. Being that it will be displayed at that external address.

So I needed this in my webpack.config.js

devServer: {  compress: true,  public: 'store-client-nestroia1.c9users.io' // That solved it}

Another solution is using it on the CLI:

webpack-dev-server --public $C9_HOSTNAME   <-- var for Cloud9 external IP

Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>