-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Invalid Host/Origin Header" warning #1604
Comments
@ravshansbox it is security fix, looks you origin than you use in config, you can use |
@evilebottnawi yes, sure, here you are: https://github.com/ravshansbox/webpack-dev-server-sample |
with |
@ravshansbox thanks, i will look in near future, but if original is not same it is normal have this error |
I have the same issue. Problem here is that browser does not send origin header at all. Here my debug of connection object
|
I am seeing this issue as well with 3.1.11. Rolling back to 3.1.10 fixes it. |
Also, got this issue after upgrading to 3.1.11 |
I also am getting this error in Firefox 64.0 with version 3.1.11. Reverting to 3.1.10 fixes it. |
I confirm, the same problem. |
Same problem here |
Please read #1604 (comment) |
fixed webpack#1604
I can confirm that the issue still exists. |
I can also confirm that the issue still exists |
Please don't spam |
I checked request sent to dev-server via Chrome in localhost, request doesn't have
webpack-dev-server/lib/Server.js Lines 644 to 646 in e614308
|
Sockjs will remove |
In my opinion, it is better to revert #1603 until sockjs/sockjs-node#247 is merged. |
@3846masa let's wait some time and revert it, maybe we can implement workaround on our side, need investigate, feel free to do it, thanks |
refactor: changed name of variant - Also added `disableHostCheck: true` to disable error "Invalid Host/Origin Header" warning - issue webpack/webpack-dev-server#1604
Even with disableHostCheck now after updating I can not get rid of these errors. |
I'd just given up on getting Mix to work with HMR (specifically with CORS since we're using servidor.local which points to Vagrant, and HMR hosts the assets on localhost). Turns out instead of trying to set the allowed origins header we need to disable the host check.* We no longer have a need for browser-sync now either, hence its removal. Also cleans up the npm commands. Don't need two of everything and we don't need the full path to webpack[,-dev-server] either. * See webpack/webpack-dev-server#1604 for details
…prevent 'Invalid Host/Origin header' error in IE Workaround mentioned in webpack/webpack-dev-server#1604 (comment)
Are there any chances to solve this problem soon? |
Currently active problem with vue.js See webpack/webpack-dev-server#1604
…prevent 'Invalid Host/Origin header' error in IE Workaround mentioned in webpack/webpack-dev-server#1604 (comment)
…prevent 'Invalid Host/Origin header' error in IE Workaround mentioned in webpack/webpack-dev-server#1604 (comment)
…prevent 'Invalid Host/Origin header' error in IE Workaround mentioned in webpack/webpack-dev-server#1604 (comment)
…prevent 'Invalid Host/Origin header' error in IE Workaround mentioned in webpack/webpack-dev-server#1604 (comment)
* Suppress "Invalid Host/Origin Header" error in plunker when using HTTPS See webpack/webpack-dev-server#1604. * Fix chance error in Select List documentation * Fix ExpressionChanged error for aria-controls
If you're using @angular-builders/custom-webpack try this:
|
I am running 3.11.0 webpack-dev-server and still having this problem after specifying |
I see this message consistently when I run my project via Fiddler at localhost.fiddler:4200 and not when I use localhost:4200. |
This is happening now on webpack 5 and disableHostCheck is not part of the api anymore. Any thoughts? |
Using webpack-dev-server 4.0.0 headers: {
'Access-Control-Allow-Origin': '*'
}, This is also not working |
@kevinmu17 the |
This link should be available on https://webpack.js.org/configuration/dev-server/ This was a live saver, I was banging my head, the information is very well explained and it took me a few hours to migrate. Thank you very much for pointing this out! |
PLEASE READ
We are working on this problem. It is regression problem after fixing security error. Security issues are always high priority and we would not want to revert it, but it is require some changes in sockjs/sockjs-node#247, we have workaround for this problem #1608, but need some feedback. Feel free to feedback.
Fast workaround (put it in your
devServer
property in config):We apologize for the situation. Thanks for helping us do
webpack
better. ⭐ ⭐ ⭐Code
Expected Behavior
No warnings
Actual Behavior
Getting "Invalid Host/Origin Header" warning in browser console
For Bugs; How can we reproduce the behavior?
install webpack-dev-server@3.1.11 and run (v3.1.10 working as expected).
The text was updated successfully, but these errors were encountered: