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 刘芳友 for I am getting an "Invalid Host header" message when connecting to webpack-dev-server remotely

$
0
0

The problem occurs because webpack-dev-server 2.4.4 adds a host check. You can disable it by adding this to your webpack config:

 devServer: {    compress: true,    disableHostCheck: true,   // That solved it }      

EDIT: Please note, this fix is insecure.

Please see the following answer for a secure solution:https://stackoverflow.com/a/43621275/5425585


Viewing all articles
Browse latest Browse all 26

Trending Articles



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