proxy.ts 942 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
  3. * -------------------------------
  4. * The agent cannot take effect in the production environment
  5. * so there is no configuration of the production environment
  6. * For details, please see
  7. * https://pro.ant.design/docs/deploy
  8. */
  9. export default {
  10. dev: {
  11. // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
  12. '/sgadmin/duoduo-service': {
  13. target: 'https://duoduoenv.sagacloud.cn/',
  14. // target: 'http://192.168.12.13:52011/',
  15. changeOrigin: true,
  16. pathRewrite: {
  17. '^/sgadmin/duoduo-service': '/duoduo-service',
  18. },
  19. },
  20. },
  21. test: {
  22. '/api/': {
  23. target: 'http://192.168.0.14:52015/',
  24. changeOrigin: true,
  25. pathRewrite: { '^/api': '' },
  26. },
  27. },
  28. pre: {
  29. '/api/': {
  30. target: 'your pre url',
  31. changeOrigin: true,
  32. pathRewrite: { '^/api': '' },
  33. },
  34. },
  35. };