调试跨域的问题

This commit is contained in:
liangping 2021-07-22 21:06:08 +08:00
parent db623812aa
commit 1812230623
2 changed files with 4 additions and 4 deletions

View File

@ -20,9 +20,9 @@ export default {
},
mounted() {
this.$http.get('/api/node_info', { crossdomain: true }).then(response => {
this.data.info = response.data
this.info = response.data
}).catch(e => {
this.errors.push(e)
console.log(e)
})
},
}

View File

@ -46,8 +46,8 @@ module.exports = {
transpileDependencies: ['vue-echarts', 'resize-detector'],
devServer: {
proxy: {
api: {
target: 'https://api.cosmos.network',
'/api': {
target: 'https://lcd-cosmos.cosmostation.io/',
changeOrigin: true,
pathRewrite: {
'^/api': '',