proxy.ts 989 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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: 'https://api.zanxiangwl.com',
  12. changeOrigin: true,
  13. pathRewrite: { '/api': '' },
  14. },
  15. '/erpApi/': {
  16. target: 'https://api.zanxiangwl.com',
  17. changeOrigin: true,
  18. pathRewrite: { '/erpApi': '' },
  19. },
  20. '/gameApi/': {
  21. target: 'https://game.84game.cn',//服务器
  22. changeOrigin: true,
  23. pathRewrite: { '^/gameApi/': '' },
  24. },
  25. },
  26. test: {
  27. '/api/': {
  28. target: 'https://preview.pro.ant.design',
  29. changeOrigin: true,
  30. pathRewrite: { '^': '' },
  31. },
  32. },
  33. pre: {
  34. '/api/': {
  35. target: 'your pre url',
  36. changeOrigin: true,
  37. pathRewrite: { '^': '' },
  38. },
  39. },
  40. }