proxy.ts 851 B

1234567891011121314151617181920212223242526272829303132333435
  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: 'http://192.168.1.21:38089',
  12. // changeOrigin: true,
  13. // pathRewrite: { '^/api': '' },
  14. // },
  15. '/api': {
  16. target: 'https://open.luojigou.vip',
  17. changeOrigin: true,
  18. pathRewrite: { '^/api': '' },
  19. },
  20. },
  21. test: {
  22. '/api/': {
  23. target: 'https://preview.pro.ant.design',
  24. changeOrigin: true,
  25. pathRewrite: { '^': '' },
  26. },
  27. },
  28. pre: {
  29. '/api/': {
  30. target: 'your pre url',
  31. changeOrigin: true,
  32. pathRewrite: { '^': '' },
  33. },
  34. },
  35. };