Ant Design Pro 跨域配置

时间:2019-08-26 07:51:30   收藏:0   阅读:1613

config/config.js

  proxy: {
    ‘/api‘: {
      target: ‘http://localhost:8080/santa‘,
      changeOrigin: true,
    },
  },

 

浏览器访问地址:

http://localhost:8000//api/login/account

请求服务端访问的地址:

http://localhost:8080/santa/api/login/account

 

原文:https://www.cnblogs.com/xiaoyutongxue/p/11409579.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!