proxy.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
  3. * The agent cannot take effect in the production environment
  4. * so there is no configuration of the production environment
  5. * For details, please see
  6. * https://pro.ant.design/docs/deploy
  7. */
  8. export default {
  9. dev: {
  10. '/api/': {
  11. // target: 'http://test.api.zanxiangwl.com',
  12. target: 'https://game.84game.cn',
  13. changeOrigin: true,
  14. pathRewrite: { '/api': '' },
  15. },
  16. '/erpApi/': {
  17. // target: 'http://test.api.zanxiangwl.com',
  18. target: 'https://api.zanxiangwl.com',
  19. changeOrigin: true,
  20. pathRewrite: { '/erpApi': '' },
  21. },
  22. '/gameApi/': {
  23. // target: 'http://test.api.zanxiangwl.com',//服务器
  24. target: 'https://game.84game.cn',//服务器
  25. changeOrigin: true,
  26. pathRewrite: { '^/gameApi/': '' },
  27. },
  28. },
  29. test: {
  30. '/api/': {
  31. target: 'https://preview.pro.ant.design',
  32. changeOrigin: true,
  33. pathRewrite: { '^': '' },
  34. },
  35. },
  36. pre: {
  37. '/api/': {
  38. target: 'your pre url',
  39. changeOrigin: true,
  40. pathRewrite: { '^': '' },
  41. },
  42. },
  43. }