Node实现中间层转发解决跨域,express-http-proxy
app.js(所在端口:3000)
axios.get('http://127.0.0.1:3001/proxy/api/search') // 向3001端口请求数据
.then(res => res.data)
.then(res => console.log(res.data))
server.js (开启端口3001)
let express...
原创
2019-03-20 17:30:30 ·
2587 阅读 ·
0 评论