proxy.ts 928 B

12345678910111213141516171819202122232425262728293031323334353637
  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': {
  13. // target: 'https://duoduoenv.sagacloud.cn/',
  14. target: 'http://10.100.28.79',
  15. changeOrigin: true,
  16. pathRewrite: {
  17. '^/sgadmin': '/sgadmin',
  18. // '^/sgadmin': '/',
  19. },
  20. },
  21. },
  22. test: {
  23. '/api/': {
  24. target: 'http://192.168.0.14:52015/',
  25. changeOrigin: true,
  26. pathRewrite: { '^/api': '' },
  27. },
  28. },
  29. pre: {
  30. '/api/': {
  31. target: 'your pre url',
  32. changeOrigin: true,
  33. pathRewrite: { '^/api': '' },
  34. },
  35. },
  36. };