Vue error: Invalid Host Header

Handwritten on 02 Jul 2019


Getting the Invalid Host Header error when bootstrapping a new Vue.js app. This app is served behind a nginx proxy: http://client.go/.


Solution is to create a config file in the root of your Vue.js app: vue.config.js:

// This is an optional file but needed when serving Vue 
// behind a proxy, we need to disable host checks.
module.exports = {
  devServer: {
    disableHostCheck: true

More info


© 2023 Handcrafted in Nijmegen, The Netherlands