proxy.ts 968 B

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: 'http://api.zanxiangwl.com',
  12. // target: 'https://testapi.zanxiangwl.com',
  13. changeOrigin: true,
  14. pathRewrite: { '/api': '' },
  15. },
  16. '/gameApi/': {
  17. // target: 'http://test.api.zanxiangwl.com',//服务器
  18. target: 'https://game.84game.cn',//服务器
  19. changeOrigin: true,
  20. pathRewrite: { '^/gameApi/': '' },
  21. },
  22. },
  23. test: {
  24. '/api/': {
  25. target: 'https://preview.pro.ant.design',
  26. changeOrigin: true,
  27. pathRewrite: { '^': '' },
  28. },
  29. },
  30. pre: {
  31. '/api/': {
  32. target: 'your pre url',
  33. changeOrigin: true,
  34. pathRewrite: { '^': '' },
  35. },
  36. },
  37. }