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

已解决  哈哈哈哈哈

1
1
慕神2393367
咋解决的
2020-05-29
共1条回复

Node.js+Express+Koa2+Nest.js 开发服务端

从入门到实战,一站式掌握 Node.js+Express+Koa2

4132 学习 · 2025 问题

查看课程