webpack-dev-server 报 [ Invalid Host/Origin header ] 错误

  使用webpack-dev-server有一段时间了,今天在调试时突然遇到 Invalid Host/Origin header 错误,还以为是react-hot-loader 没有配置好,因为改成v4的写法,是不是自己写错了。结果没有找到原因。之前一直是这么配置的,但是今天才看到这个错误。

  查了资料,这是昨天新出的一个issue

  https://github.com/webpack/webpack-dev-server/issues/1604,解决方案是在devServer的配置中添加  disableHostCheck: true 

  这样error就消除了...

原文地址:https://www.cnblogs.com/consolePlay520/p/10163889.html

时间: 2024-08-22 07:47:39

webpack-dev-server 报 [ Invalid Host/Origin header ] 错误的相关文章

[Webpack] Access Webpack Dev Server from Mobile Safari on an iPhone

Testing your sites on mobile devices is a critical part of the development process. Webpack dev server enables you to visit the server from any device using the host option. This lesson walks you through accessing webpack dev server using an iPhon Ch

笔记:配置 webpack dev server

笔记:配置 webpack dev server 安装 webpack-dev-server 组件 配置 webpack.config.js 配置 增加 html-webpack-plugin 组件 启动 webpack-dev-server 原文地址:https://www.cnblogs.com/F4NNIU/p/webpack-dev-server.html

webpack-devServer其他机器访问报 invalid host header

http://stackoverflow.com/questions/43650550/invalid-host-header-in-when-running-react-app

Webpack Dev Server + React Hot Loader

1.安装 npm install webpack-dev-server react-hot-loader --save-dev 2.配置server.js var webpack = require('webpack'); var WebpackDevServer = require('webpack-dev-server'); var config = require('./webpack.config'); new WebpackDevServer(webpack(config), { pu

laravel连sql server报invalid handle returned问题解决方案

https://github.com/Microsoft/msphpsql/issues/116 4.1.1驱动下载地址 https://github.com/Microsoft/msphpsql/releases/tag/v4.1.1-Windows 还有一说是 在数据库配置中加入 ‘pooling’ => false ‘sqlsrv’ => [ ‘driver’   => ‘sqlsrv’, ‘host’     => ‘xxx’, ‘database’ => ‘xxx’

create-react-app之Invalid Host Header

[create-react-app之Invalid Host Header] 1.When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks. yo

nodejs 项目,请求返回Invalid Host header问题

今天在linux上安装node,使用node做一个web服务器,在linux上安装各种依赖以后开始运行但是,出现了:Invalid Host header 的样式,在浏览器调试中发现是node返回的错误! 于是就百度,最后找到了一个解决的方法,(看的别人的). 是webpack-dev-server版本更新了的问题. 解决问题的方法: 添加配置信息 disableHostCheck: true // 启动服务 var app = new WebpackDevServer(webpack(conf

【记录】解决uni-app 用nginx反向代理出现Invalid Host header问题

之前解决过一次,后来给忘记了,今天又遇到这个问题,现记录一下 修改uni-app的manifest.json文件  - >源码视图 添加以下代码: "disableHostCheck" : true //解决127.0.0.1指向其他域名时出现"Invalid Host header"问题 VUE项目遇到此问题也类似解决方案(因为uni-app :一款基于vue的跨平台前端框架) VUE工程解决方案参考:https://blog.csdn.net/Cookys

mysql不能链接远程,报(Host '***.***.***.***' is not allowed to connect to this MySQL server)

Host '***.***.***.***' is not allowed to connect to this MySQL server 其中***...是本机公网ip; 解决办法: 首先看报错窗口. 经查阅,错误原因是:本地IP(xxx.xxx.xxx.xxx)没有访问远程数据库的权限. 于是下面开启本地IP(xxx.xxx.xxx.xxx)对远程mysql数据库的访问权限. 首先远程连接进入服务器,在cms中输入mysql -u root -p,然后回车,输入密码后回车进入mysql命令行