react-app中通过proxy解决跨域问题

proxy代理原理 是把本地 http://localhost:3000 端口的/api请求转发到了 代理服务器  比如 http://172.20.1.148:8082      proxy代理 匹配   '/api'  的url create-react-app 的版本高于 2.0 版本的时候在 package.json 只能配置 string 类型, 配置成如下:  "proxy": "ht
相关文章
相关标签/搜索