Vuejs app showing Invalid host header error loop Vuejs app showing Invalid host header error loop vue.js vue.js

Vuejs app showing Invalid host header error loop


I believe you need to change vue.config.js

module.exports = {  devServer: {    disableHostCheck: true  }}


Generally it is not recommended to disableHostCheck: true (as it may result in security issues), unless you understand and accept the risks.

Please instead try setting webpack config as follows:

in app root in vue.config.js add

module.exports = {  devServer: {    public: 'subdomain.domain.ext:port'  }};

NB: for apps running on vuejs + nginx


Sorry that was due to my mistake, I forgot to add disableHostCheck variable in

build/webpack.dev.conf.js

adding the following solved my issue

disableHostCheck: config.dev.disableHostCheck,