proxy.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * @Author: your name
  3. * @Date: 2021-09-03 14:28:27
  4. * @LastEditors: code4eat awesomedema@gmail.com
  5. * @Description: In User Settings Edit
  6. * @FilePath: /MedicalWisdomCheckSys/config/proxy.ts
  7. */
  8. /**
  9. * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
  10. * -------------------------------
  11. * The agent cannot take effect in the production environment
  12. * so there is no configuration of the production environment
  13. * For details, please see
  14. * https://pro.ant.design/docs/deploy
  15. */
  16. //118.31.245.65 线上
  17. //112.124.59.133 测试
  18. export default {
  19. dev: {
  20. '/gateway': {
  21. target: 'http://120.27.235.181:5000/gateway',
  22. changeOrigin: true,
  23. // pathRewrite: { '^/api': '' },
  24. },
  25. },
  26. // mock: {q
  27. // '/api/': {
  28. // target: 'http://localhost:8000',
  29. // changeOrigin: true,
  30. // pathRewrite: { '^': '' },
  31. // },
  32. // },
  33. prod: {
  34. '/api/': {
  35. target: 'https://118.31.245.65:8083/',
  36. changeOrigin: true,
  37. pathRewrite: { '^': '' },
  38. },
  39. },
  40. pre: {
  41. '/api/': {
  42. target: 'your pre url',
  43. changeOrigin: true,
  44. pathRewrite: { '^': '' },
  45. },
  46. },
  47. };