Answer the question
In order to leave comments, you need to log in
How to forward axios requests through a proxy?
Greetings. there is vue-cli3
there is configuration file vue.config.js
module.exports = {
devServer: {
proxy: {
'/functions': {
target: 'http://genvue.loc',
changeOrigin: true,
secure: false
}
}
}
}
axios.get('/functions/sheet.php', {params: {page: page}})
.then((response) => {
console.log(response.data);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question