proxy.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * @Author: your name
  3. * @Date: 2021-09-03 14:28:27
  4. * @LastEditTime: 2021-11-16 09:40:40
  5. * @LastEditors: Please set LastEditors
  6. * @Description: In User Settings Edit
  7. * @FilePath: /MedicalWisdomCheckSys/config/proxy.ts
  8. */
  9. /**
  10. * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
  11. * -------------------------------
  12. * The agent cannot take effect in the production environment
  13. * so there is no configuration of the production environment
  14. * For details, please see
  15. * https://pro.ant.design/docs/deploy
  16. */
  17. //118.31.245.65
  18. export default {
  19. dev: {
  20. '/api': {
  21. target: 'http://118.31.245.65:8083/',
  22. changeOrigin: true,
  23. pathRewrite: { '^/api': '' },
  24. },
  25. },
  26. mock: {
  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. };