[Vuejs]-CORS Axios Redmine

0👍

I don’t know you got problem yet or not but i solved the issue just by using proxy in my code. instead of that server i used localhost for calling my api and localhost is a proxy for my domain.com.

 devServer: 

{
port: 80,
proxy: {
// proxy all requests starting with /api to jsonplaceholder
‘/api’: {
target: ‘http://sub.domain.com/‘,
changeOrigin: true,
pathRewrite: {
‘^/api’: ”
}
}
}
},

Leave a comment