proxy.js 829B

1234567891011121314151617181920212223242526272829303132333435363738
  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://127.0.0.1:8081',
  13. // target: 'https://www.newhousehold.cn',
  14. changeOrigin: true,
  15. pathRewrite: {
  16. '^': '',
  17. },
  18. },
  19. },
  20. test: {
  21. '/api/': {
  22. target: 'https://xlk.njyz.tech',
  23. changeOrigin: true,
  24. pathRewrite: {
  25. '^': '',
  26. },
  27. },
  28. },
  29. pre: {
  30. '/api/': {
  31. target: 'your pre url',
  32. changeOrigin: true,
  33. pathRewrite: {
  34. '^': '',
  35. },
  36. },
  37. },
  38. };