Invalid host header error in Vue using peanut shell agent

In the root directory of the project of the package. The json file “dev” : “webpack dev – server – the content – base./- open – the inline – hot — compress – history – API – fallback – config build/webpack dev. Config. Js” add – behind the host 192.168.1.5 (fill in your own IP address). This is because the new version of webpack-dev-server checks the hostname by default for security reasons, and breaks access if the hostname is not in the configuration. You can add the following webpack-dev-server configuration to webpack.base.config.js in the build directory: devServer: {disableHostCheck: true,},

Read More: