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

猜你喜欢

转载自www.cnblogs.com/xiaoyutongxue/p/11409579.html