proxy.ts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. '/hanchao': {
  38. target: 'http://192.168.16.181:52009/',
  39. // target: 'http://10.100.28.79',
  40. changeOrigin: true,
  41. pathRewrite: {
  42. // '^/sgadmin': '/sgadmin',
  43. '^/hanchao': '',
  44. },
  45. },
  46. '/xiaojing': {
  47. target: 'http://192.168.4.29:52015/',
  48. // target: 'http://10.100.28.79',
  49. changeOrigin: true,
  50. pathRewrite: {
  51. // '^/sgadmin': '/sgadmin',
  52. '^/xiaojing': '',
  53. },
  54. },
  55. },
  56. test: {
  57. '/api/': {
  58. target: 'http://192.168.0.14:52015/',
  59. changeOrigin: true,
  60. pathRewrite: { '^/api': '' },
  61. },
  62. },
  63. pre: {
  64. '/api/': {
  65. target: 'your pre url',
  66. changeOrigin: true,
  67. pathRewrite: { '^/api': '' },
  68. },
  69. },
  70. };