webpack-dev-server host invalid host header 今天遇到一个问题,访问webpack启动的server,直接使用localhost和127.0.0.1都可以正常访问,但是修改了host,使用hostname访问,就会显示invalid host header。 本来一直以为是vpn导致host失效,也是一直朝这个方向修改的,可是一直没有修复 无意中发现其他host都是有效的,唯独这个不行,再看看server,已经是express了!说明请求是到达服务器的,跟host配置无关。那到底是什么问题? 原来新版的webpack-... 2017年05月23日 webpack 暂无评论 喜欢 2 阅读 354 次 阅读全文
Error occurred while trying to proxy request Error occurred while trying to proxy request 解决,不能采用 http://localhost:9000/xxx,换成 http://ip:9000/xxx 开发环境下,采用 https://github.com/vuejs-templates/webpack 配置,后台服务出口 http://localhost:9000/rest,配置 proxyTable: proxyTable: { //'/api/**': 'http://localhost:9000/rest/api' '/api/':{ target: 'http://localhost:9000/rest', ... 2017年05月23日 webpack 暂无评论 喜欢 2 阅读 2,586 次 阅读全文
javascript有alert()不按顺序执行怎么解决 javascript有alert()不按顺序执行怎么解决 if (list[i].firstChild.nodeValue.replace(/(^s*)|(s*$)/g, "") == text){ list[i].style.background = "red"; clearInterval(timer); setTimeout(function(){ alert("find it"); },0) } list[i].style.background = "red";本来就... 2017年05月06日 JavaScript 暂无评论 喜欢 0 阅读 119 次 阅读全文