proxy.js 776 B

123456789101112131415161718192021222324252627282930313233343536
  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. '/cld2/': {
  11. target: 'http://192.168.1.26:7001/',
  12. changeOrigin: true,
  13. pathRewrite: {
  14. '^': '',
  15. },
  16. },
  17. },
  18. // test: {
  19. // '/api/': {
  20. // target: 'http://cld2.com:9090/login',
  21. // changeOrigin: true,
  22. // pathRewrite: {
  23. // '^': '',
  24. // },
  25. // },
  26. // },
  27. pre: {
  28. '/api/': {
  29. target: 'your pre url',
  30. changeOrigin: true,
  31. pathRewrite: {
  32. '^': '',
  33. },
  34. },
  35. },
  36. };