proxy.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. },
  38. test: {
  39. '/api/': {
  40. target: 'http://192.168.0.14:52015/',
  41. changeOrigin: true,
  42. pathRewrite: { '^/api': '' },
  43. },
  44. },
  45. pre: {
  46. '/api/': {
  47. target: 'your pre url',
  48. changeOrigin: true,
  49. pathRewrite: { '^/api': '' },
  50. },
  51. },
  52. };