proxy.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * @Author: your name
  3. * @Date: 2021-07-22 15:04:09
  4. * @LastEditTime: 2021-07-28 17:11:31
  5. * @LastEditors: Please set LastEditors
  6. * @Description: In User Settings Edit
  7. * @FilePath: /TracerMethodology_PC/config/proxy.js
  8. */
  9. /**
  10. * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
  11. * -------------------------------
  12. * The agent cannot take effect in the production environment
  13. * so there is no configuration of the production environment
  14. * For details, please see
  15. * https://pro.ant.design/docs/deploy
  16. */
  17. export default {
  18. mock: {
  19. '/api/': {
  20. target: 'http://localhost',
  21. changeOrigin: true,
  22. pathRewrite: {
  23. '^/api': '',
  24. },
  25. },
  26. },
  27. dev: {
  28. '/api/': {
  29. target: 'http://112.124.59.133:8082', //开发本地:192.168.51.76 ,dev:112.124.59.133:8082
  30. changeOrigin: true,
  31. pathRewrite: {
  32. '^/api': '',
  33. },
  34. },
  35. },
  36. test: {
  37. '/api/': {
  38. target: 'https://preview.pro.ant.design',
  39. changeOrigin: true,
  40. pathRewrite: {
  41. '^': '',
  42. },
  43. },
  44. },
  45. pre: {
  46. '/api/': {
  47. target: 'your pre url',
  48. changeOrigin: true,
  49. pathRewrite: {
  50. '^': '',
  51. },
  52. },
  53. },
  54. };