proxy-pro.js 453 B

12345678910111213141516
  1. 'use strict'
  2. // 跨域请求设置,可配置多个
  3. module.exports = {
  4. table: [{
  5. context: ['/'],
  6. target: 'http://32.0.15.107:8080/api/',
  7. //target: 'http://101.133.214.75:81/api',
  8. changeOrigin: true,
  9. pathRewrite: { '': '/' }, // '^/api' 是一个正则表达式,作用:将 /api 提换成为 /
  10. }, ],
  11. // 本地配置ip访问(手机可通过IP访问),需要修改成本地Ip地址
  12. }