proxy.js 879B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
  3. * The agent cannot take effect in the production environment
  4. * so there is no configuration of the production environment
  5. * For details, please see
  6. * https://pro.ant.design/docs/deploy
  7. */
  8. export default {
  9. dev: {
  10. '/api/': {
  11. // target: 'https://xlk.njyz.tech/',
  12. // target: 'http://192.168.89.147:8081',
  13. target: 'http://192.168.2.7:8081/',
  14. // target: 'https://www.newhousehold.cn',
  15. changeOrigin: true,
  16. pathRewrite: {
  17. '^': '',
  18. },
  19. },
  20. },
  21. test: {
  22. '/api/': {
  23. target: 'https://xlk.njyz.tech',
  24. changeOrigin: true,
  25. pathRewrite: {
  26. '^': '',
  27. },
  28. },
  29. },
  30. pre: {
  31. '/api/': {
  32. target: 'your pre url',
  33. changeOrigin: true,
  34. pathRewrite: {
  35. '^': '',
  36. },
  37. },
  38. },
  39. };