其他分享
首页 > 其他分享> > Ant Design Pro 跨域配置

Ant Design Pro 跨域配置

作者:互联网

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

 

标签:account,http,Pro,Ant,api,Design,santa,config,localhost
来源: https://www.cnblogs.com/xiaoyutongxue/p/11409579.html