[Vuejs]-Vue+Express+Axios Host Access to Guest App in Virtualbox getting CORS Error

0๐Ÿ‘

โœ…

I finally found a way to get it working. I changed the VM network setting back to Bridged Adaptor and changed localhost to the VMs IP in my server call from Vue.

this.$http.post('http://192.168.1.x:3000/login', {
    email: this.email,
    password: this.password,
})

-1๐Ÿ‘

Have you tried to allow all headers?

app.use(cors());

Leave a comment