Invalid Host header

来源:互联网 发布:怎么删除多重网络 编辑:程序博客网 时间:2024/06/06 03:31

在前端做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'},

原创粉丝点击