proxy.ts 1.2 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: 'https://preview.pro.ant.design',
  12. changeOrigin: true,
  13. pathRewrite: { '^': '' },
  14. },
  15. '/wazhima': {
  16. target: 'http://api.starbuds.laylib.com/', //测试
  17. // target:'http://zhima.xingya.live/', //生产
  18. changeOrigin: true,
  19. },
  20. '/api-common': {
  21. target: 'http://api.starbuds.laylib.com', //测试
  22. //target: 'http://h5.paqukeji.com', //生产
  23. changeOrigin: true,
  24. },
  25. '/api-app': {
  26. target: 'http://api.starbuds.laylib.com', //测试
  27. //target: 'http://h5.paqukeji.com', //生产
  28. changeOrigin: true,
  29. },
  30. },
  31. test: {
  32. '/api/': {
  33. target: 'https://preview.pro.ant.design',
  34. changeOrigin: true,
  35. pathRewrite: { '^': '' },
  36. },
  37. },
  38. pre: {
  39. '/api/': {
  40. target: 'your pre url',
  41. changeOrigin: true,
  42. pathRewrite: { '^': '' },
  43. },
  44. },
  45. };