vue代理设置 可以解决当前的跨域问题吗
来源:7-17 nginx配置
慕九州0244852
2020-05-20
这是vue设置代理
proxyTable: {
’/api’:{
target: ‘http://localhost:8888’, // 后台接口域名
changeOrigin: true, //是否跨域
// pathRewrite:{
// ‘^/api’:’’
// }
}
},
这是node服务的端口
const severFunction = require(’…/app’)
const http = require(‘http’)
const port = 8888
const sever = http.createServer(severFunction)
sever.listen(port)
console.log(‘服务启动’)
写回答
1回答
-
慕九州0244852
提问者
2020-05-20
已解决 哈哈哈哈哈
112020-05-29
相似问题
配置nginx后登录访问跨域
回答 1
nginx反向代理遭遇了跨域问题
回答 1