proxy.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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://10.100.28.79',
  15. // changeOrigin: true,
  16. // pathRewrite: {
  17. // '^/sgadmin/duoduo-service': '/sgadmin/duoduo-service',
  18. // },
  19. // },
  20. // '/sgadmin/sso': {
  21. // //target: 'https://duoduoenv.sagacloud.cn/',
  22. // target: 'http://10.100.28.79',
  23. // changeOrigin: true,
  24. // pathRewrite: {
  25. // '^/sgadmin/sso': '/sgadmin/sso',
  26. // },
  27. // },
  28. '/sgadmin/duoduo-service': {
  29. target: 'https://duoduoenv.sagacloud.cn/',
  30. // target: 'http://10.100.28.79',
  31. changeOrigin: true,
  32. pathRewrite: {
  33. // '^/sgadmin': '/sgadmin',
  34. '^/sgadmin/duoduo-service': '/duoduo-service',
  35. },
  36. },
  37. '/image-service': {
  38. target: 'http://api.sagacloud.cn/',
  39. // target: 'http://10.100.28.79',
  40. changeOrigin: true,
  41. pathRewrite: {
  42. '^/image-service': '',
  43. },
  44. },
  45. '/yongqi': {
  46. target: 'http://192.168.88.4:58003/',
  47. // target: 'http://10.100.28.79',
  48. changeOrigin: true,
  49. pathRewrite: {
  50. // '^/sgadmin': '/sgadmin',
  51. '^/yongqi': '',
  52. },
  53. },
  54. '/xiaojing': {
  55. target: 'http://192.168.4.29:52015/',
  56. // target: 'http://10.100.28.79',
  57. changeOrigin: true,
  58. pathRewrite: {
  59. // '^/sgadmin': '/sgadmin',
  60. '^/xiaojing': '',
  61. },
  62. },
  63. },
  64. test: {
  65. '/api/': {
  66. target: 'http://192.168.0.14:52015/',
  67. changeOrigin: true,
  68. pathRewrite: { '^/api': '' },
  69. },
  70. },
  71. pre: {
  72. '/api/': {
  73. target: 'your pre url',
  74. changeOrigin: true,
  75. pathRewrite: { '^/api': '' },
  76. },
  77. },
  78. };