vue-cli 解決Invalid Host header
阿新 • • 發佈:2017-12-21
pack ali pen head pre over isa ets pos
在webpack.dev.conf.js中添加:disableHostCheck: true
devServer: {
public: ‘local.kingsum.biz‘,
clientLogLevel: ‘warning‘,
historyApiFallback: true,
hot: true,
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: { poll: config.dev.poll, }, disableHostCheck: true 加上這段 }
watchOptions: { poll: config.dev.poll, }, disableHostCheck: true 加上這段 }
vue-cli 解決Invalid Host header