proxy-dev.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * @Descripttion:
  3. * @version:
  4. * @Author: wt
  5. * @Date: 2023-01-29 13:14:08
  6. * @LastEditors: wt
  7. * @LastEditTime: 2023-04-14 19:25:59
  8. */
  9. "use strict";
  10. // 跨域请求设置,可配置多个
  11. module.exports = {
  12. port: 81,
  13. //localhost: '172.16.120.200',
  14. // 本地配置ip访问(手机可通过IP访问),需要修改成本地Ip地址
  15. localhost: "172.200.50.18",
  16. table: {
  17. "/prod-api": {
  18. // target: 'http://32.0.15.107:8080/prod-api', //线上-107测试服务器
  19. target: 'http://10.236.244.108:8083/prod-api', //线上-8083测试服务器
  20. // target: "http://park.usky.cn/prod-api", //线上-20正式服务器
  21. // target: 'http://172.16.120.165:801/dev-api', //165
  22. // target: 'http://32.0.15.107:8080/api/', //闵行线上发布时
  23. // ws: true, // 代理websockets
  24. changeOrigin: true,
  25. pathRewrite: {
  26. //'^/api1' 是一个正则表达式,作用:将 /api1 提换成为 /
  27. "^/prod-api": "/",
  28. },
  29. },
  30. "/api": { //和mhapi互换
  31. // 原有api
  32. // target: 'http://32.0.15.107:8080/api/', //杨强闵行
  33. // target: 'http://32.0.15.107:8080/api',
  34. target: 'http://10.236.244.108:8083/api',
  35. // target: 'https://mhxfzd.shmh.gov.cn/api',
  36. ws: true, // 代理websockets
  37. changeOrigin: true,
  38. pathRewrite: {
  39. //'^/api' 是一个正则表达式,作用:将 /api 提换成为 /
  40. "^/api": "/",
  41. },
  42. },
  43. // "/mhapi": {//和api互换
  44. // // target: "http://172.16.120.165:13200/mhapi", //165
  45. // // target: "http://park.usky.cn/mhapi", //20
  46. // target: "http://32.0.15.107:8080/mhapi", //107
  47. // ws: true, // 代理websockets
  48. // changeOrigin: true,
  49. // pathRewrite: {
  50. // //'^/api4' 是一个正则表达式,作用:将 /api4 提换成为 /
  51. // "^/mhapi": "/",
  52. // },
  53. "/video-api": {
  54. // 执法仪视频
  55. target: "http://10.107.31.215:50080/video-api",
  56. ws: true, // 代理websockets
  57. changeOrigin: true,
  58. pathRewrite: {
  59. //'^/api' 是一个正则表达式,作用:将 /api 提换成为 /
  60. "^/video-api": "/",
  61. },
  62. },
  63. "/video": {
  64. // 执法仪视频
  65. target: "http://32.0.15.107:8080/video-api",
  66. ws: true, // 代理websockets
  67. changeOrigin: true,
  68. pathRewrite: {
  69. //'^/api' 是一个正则表达式,作用:将 /api 提换成为 /
  70. "^/video": "/",
  71. },
  72. },
  73. }
  74. };