proxy.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
  3. * -------------------------------
  4. * The agent cannot take effect in the production environment
  5. * so there is no configuration of the production environment
  6. * For details, please see
  7. * https://pro.ant.design/docs/deploy
  8. */
  9. export default {
  10. dev: {
  11. // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
  12. '/api/': {
  13. // 要代理的地址
  14. target: 'https://preview.pro.ant.design',
  15. // 配置了这个可以从 http 代理到 https
  16. // 依赖 origin 的功能可能需要这个,比如 cookie
  17. changeOrigin: true,
  18. },
  19. '/web/': {
  20. // 要代理的地址
  21. // target: 'http://192.168.0.224:8199', // 开发
  22. // target: 'http://192.168.0.18:8199', // 秀本地
  23. target: 'https://app.yongxulvjian.com', // 生产
  24. changeOrigin: true,
  25. },
  26. '/s/': {
  27. // 要代理的地址
  28. // target: 'http://192.168.0.224:18199/', // 开发
  29. target: 'https://app.yongxulvjian.com', // 生产
  30. changeOrigin: true,
  31. },
  32. },
  33. test: {
  34. '/api/': {
  35. target: 'https://proapi.azurewebsites.net',
  36. changeOrigin: true,
  37. pathRewrite: { '^': '' },
  38. },
  39. },
  40. pre: {
  41. '/api/': {
  42. target: 'your pre url',
  43. changeOrigin: true,
  44. pathRewrite: { '^': '' },
  45. },
  46. },
  47. };