调试跨域的问题
This commit is contained in:
parent
db623812aa
commit
1812230623
@ -20,9 +20,9 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$http.get('/api/node_info', { crossdomain: true }).then(response => {
|
this.$http.get('/api/node_info', { crossdomain: true }).then(response => {
|
||||||
this.data.info = response.data
|
this.info = response.data
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
this.errors.push(e)
|
console.log(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,8 @@ module.exports = {
|
|||||||
transpileDependencies: ['vue-echarts', 'resize-detector'],
|
transpileDependencies: ['vue-echarts', 'resize-detector'],
|
||||||
devServer: {
|
devServer: {
|
||||||
proxy: {
|
proxy: {
|
||||||
api: {
|
'/api': {
|
||||||
target: 'https://api.cosmos.network',
|
target: 'https://lcd-cosmos.cosmostation.io/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/api': '',
|
'^/api': '',
|
||||||
|
Loading…
Reference in New Issue
Block a user