-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
new vue.js project preview yields "Invalid Host header" #26
Comments
The dev server isn't accepting external requests. You need to put below's config // vue.config.js
module.exports = {
// options...
devServer: {
disableHostCheck: true
}
} |
Yep. That did the trick. |
Also the host needs to be passed and set to 0.0.0.0 as it defaults to only accepting
|
Btw. the latest update includes full support for |
Thanks!your answer.my name is bobo. |
Closed, but it is better to use |
Where is the file vue.config.js located or do I need to create it? I'm using vue/cli 3.9 |
Till upstream is fixed there is not escape.
@sobiero Yes, create it in root! |
You can create a file with that name if you don't have it and add it on the root of your project (same level as package.json for example) |
The dev server isn't accepting external requests. You need to put below's config // vue.config.js |
ssfa |
I tried passing the url with yarn run dev --public $GITPOD_WORKSPACE_URL Even tried passing the port --public $GITPOD_WORKSPACE_URL:443 Also, using |
this fixed the error for me: |
This answer helps me a lot. Thank!
|
great |
is same as for ionic angular? I'm include above the module file but is still showing "Invalid Host Header" |
I'm too |
I fixed it, only change your |
right,if you use vue-cli greater than version 5 ,please change |
Installing the vue cli via "npm i -g @vue/cli" and running "vue create hello-world" worked great. However, running it with "yarn serve" and previewing the output on port 8080 yielded a page that said only "Invalid Host header".
The text was updated successfully, but these errors were encountered: