netapp做内网穿透有问题
內網穿透 vue 返回 invalid host header
2019年03月17日 16:05:29?renzhehongyi?閱讀數:1926收起
個人分類:?互聯網Vue
問題:使用花生殼內網穿透只返回304,invalid host header
原因:新版的webpack-dev-server出于安全考慮,默認檢查hostname,如果hostname不是配置內的,將中斷訪問。
解決:webpack.dev.conf.js添加配置?disableHostCheck: true,
?devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
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,
},
disableHostCheck: true, },
總結
以上是生活随笔為你收集整理的netapp做内网穿透有问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 拳皇出招快捷键怎么设置(拳皇出招快捷键怎
- 下一篇: 网页最底部设计时要怎么做呢(网页设计底部