proxy.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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': {
  29. target: 'https://duoduoenv.sagacloud.cn/',
  30. //target: 'http://10.100.28.79',
  31. changeOrigin: true,
  32. pathRewrite: {
  33. '^/sgadmin': '',
  34. },
  35. },
  36. },
  37. test: {
  38. '/api/': {
  39. target: 'http://192.168.0.14:52015/',
  40. changeOrigin: true,
  41. pathRewrite: { '^/api': '' },
  42. },
  43. },
  44. pre: {
  45. '/api/': {
  46. target: 'your pre url',
  47. changeOrigin: true,
  48. pathRewrite: { '^/api': '' },
  49. },
  50. },
  51. };