proxy.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * @Author: your name
  3. * @Date: 2021-09-03 14:28:27
  4. * @LastEditTime: 2022-01-05 15:03:31
  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. //112.124.59.133 测试
  19. export default {
  20. dev: {
  21. '/api': {
  22. target: 'http://118.31.245.65:8083/',
  23. changeOrigin: true,
  24. pathRewrite: { '^/api': '' },
  25. },
  26. },
  27. mock: {
  28. '/api/': {
  29. target: 'http://localhost:8000',
  30. changeOrigin: true,
  31. pathRewrite: { '^': '' },
  32. },
  33. },
  34. prod: {
  35. '/api/': {
  36. target: 'https://118.31.245.65:8083/',
  37. changeOrigin: true,
  38. pathRewrite: { '^': '' },
  39. },
  40. },
  41. pre: {
  42. '/api/': {
  43. target: 'your pre url',
  44. changeOrigin: true,
  45. pathRewrite: { '^': '' },
  46. },
  47. },
  48. };