在前端做nginx代理时候,会报错:Invalid Host header
解决办法:
在webpack-config*.js里边增加
disableHostCheck: true, 如下所示:
devServer: { contentBase: path.join(__dirname, "dist"), // disableHostCheck: true, compress: false, open: true, disableHostCheck: true, stats: 'errors-only' },