Skip to content
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 header": --host 0.0.0.0 not working with public ip, due to webpack-dev-server v2.4.3 security fix #38

Closed
luckynum7 opened this issue Apr 27, 2017 · 6 comments

Comments

@luckynum7
Copy link

Hi guys,

I'm still use the 1.0.9 version template, after reinstall my pc and checkout my projects. I ran into an error on my test phone, Invalid Host header with a white background.

As per webpack/webpack-dev-server#882 (comment), and https://github.com/webpack/webpack-dev-server/releases/tag/v2.4.3,

  • Requests are not blocked when Host doesn't match listening host or public option.
  • Requests to localhost or 127.0.0.1 are not blocked.

the config in webpack.config.js (https://github.com/centrual/cordova-template-framework7-vue-webpack/blob/master/template_src/webpack.config.js#L105)

host: "0.0.0.0",

My due date is today, so I just add disableHostCheck: true under that line to continue the work.

Hope you'll find a better way to fix this. : )

@centrual
Copy link
Collaborator

centrual commented Apr 27, 2017

It's already fixed in 1.0.12 also current version is 1.1.1 😄

Have a great day!

@tstikvoort
Copy link

I'm still experiencing this issue. Cordova version 6.5.0, node 6.9.2, clean install of your template. The app con't connect. After I set disableHostCheck: true, the app still doesn't work, although the app is served at localhost:8081.

@sunflowerlb
Copy link

me too!

@rajahimanath
Copy link

Has this issue ever been resolved??

@VictorioBerra
Copy link

BUMP. Why can we not override this yet? Trying to use ngrok.

@dineshmaths1
Copy link

Am using Angular CLI: 6.2.2 , Node: 8.11.1 and OS: darwin x64 This is my etc hosts 127.0.0.1 dinesh.mysocialapi.com

This is my comment node_modules/@angular/cli/bin/ng serve --host 0.0.0.0 --disableHostCheck true

am getting this error how to fix ? Loading failed for the with source “http://dinesh.mysocialapi.com/vendor.js”. dinesh.mysocialapi.com:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants