I am getting an “Invalid Host header” message when connecting to webpack-dev-server remotely

后端 未结 10 1991
粉色の甜心
粉色の甜心 2020-12-02 04:57

I am using as an environment, a Cloud9.io ubuntu VM Online IDE and I have reduced by troubleshooting this error to just running the app with Webpack dev server.

I l

10条回答
  •  感动是毒
    2020-12-02 05:25

    Rather than editing the webpack config file, the easier way to disable the host check is by adding a .env file to your root folder and putting this:

    DANGEROUSLY_DISABLE_HOST_CHECK=true
    

    As the variable name implies, disabling it is insecure and is only advisable to use only in dev environment.

提交回复
热议问题