cors.js 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. let url = "http://172.16.4.162/icore.icp.web/pass";
  2. module.exports = {
  3. proxyTable: {
  4. "/icore.icp.web/pass/v1": {
  5. target: url + "/v1", //加http
  6. changeOrigin: true,
  7. pathRewrite: {
  8. "^/icore.icp.web/pass/v1": "/", //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  9. // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  10. },
  11. },
  12. "/icore.icp.web/pass/auth": {
  13. // target: 'http://172.22.4.6:20002/auth',
  14. //target: url + '/auth',
  15. //target: 'https://172.16.4.162/icore.icp.web/pass/auth',
  16. target: "http://172.16.4.162/icore.icp.web/pass/auth",
  17. changeOrigin: true,
  18. pathRewrite: {
  19. "^/icore.icp.web/pass/auth": "/",
  20. },
  21. },
  22. "/icore.icp.web/pass/logout": {
  23. target: url + "/logout",
  24. changeOrigin: true,
  25. pathRewrite: {
  26. "^/icore.icp.web/pass/logout": "/",
  27. },
  28. },
  29. // '/icore.icp.web/pass/configCenter': {
  30. // target: 'http://dev-config.steerinfo.com/configCenter',
  31. // changeOrigin: true,
  32. // pathRewrite: {
  33. // '^/icore.icp.web/pass/configCenter': '/'
  34. // }
  35. // },
  36. "/icore.icp.web/restPassword": {
  37. target: url,
  38. changeOrigin: true,
  39. pathRewrite: {
  40. "^/icore.icp.web/restPassword": "/",
  41. },
  42. },
  43. // '/icore.icp.web/pass/serviceCenter': {
  44. // target: 'http://dev-govern.steerinfo.com',
  45. // changeOrigin: true,
  46. // pathRewrite: {
  47. // '^/icore.icp.web/pass/serviceCenter': '/'
  48. // }
  49. // },
  50. // '/icore.icp.web/pass/act': {
  51. // target: 'http://dev-act.steerinfo.com',
  52. // changeOrigin: true,
  53. // pathRewrite: {
  54. // '^/icore.icp.web/pass/act': '/'
  55. // }
  56. // },
  57. // '/icore.icp.web/pass/job': {
  58. // target: 'http://dev-job.steerinfo.com',
  59. // changeOrigin: true,
  60. // pathRewrite: {
  61. // '^/icore.icp.web/pass/job': '/'
  62. // }
  63. // },
  64. // '/icore.icp.web/pass/dd': {
  65. // target: 'http://dd.steerinfo.com',
  66. // changeOrigin: true,
  67. // pathRewrite: {
  68. // '^/icore.icp.web/pass/dd': '/'
  69. // }
  70. // },
  71. // '/icore.icp.web/pass/apiauth': {
  72. // target: 'http://auth.steerinfo.com',
  73. // changeOrigin: true,
  74. // pathRewrite: {
  75. // '^/icore.icp.web/pass/apiauth': '/'
  76. // }
  77. // },
  78. // '/icore.icp.web/pass/websocket': {
  79. // target: 'http://websocket.steerinfo.com/',
  80. // changeOrigin: true,
  81. // pathRewrite: {
  82. // '^/icore.icp.web/pass/websocket': '/'
  83. // }
  84. // },
  85. "/icore-api": {
  86. target: "http://172.16.4.162/icore.icp.web/pass/",
  87. changeOrigin: true,
  88. pathRewrite: {
  89. "^/icore-api": "/",
  90. },
  91. },
  92. "/icore.icp.web/pass/testManagement/v1": {
  93. // target: 'http://172.22.4.6:9006/v1', // 加https
  94. // target: 'http://prod-lims-test/v1', //
  95. // target: 'http://localhost:9001/v1', //加http
  96. target: "http://172.16.4.162", // 加https
  97. // target: 'https://lims-bnusiness-dev.steerinfo.com/v1', //加https
  98. changeOrigin: true,
  99. },
  100. // "/icore.icp.web/pass/testManagement/v1": {
  101. // // target: 'http://127.0.0.1:9001/v1', // 加https
  102. // target: "http://localhost:9001/v1", // 正式
  103. // changeOrigin: true,
  104. // pathRewrite: {
  105. // "^/icore.icp.web/pass/testManagement/v1": "/", // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  106. // // 比如我要调用'https://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  107. // },
  108. // },
  109. // '/icore.icp.web/pass/mqtt/v1': {
  110. // // target: 'http://172.22.4.6:9006/v1', // 加https
  111. // // target: 'http://prod-lims-test/v1', // 加https
  112. // target: 'http://172.16.4.162:9410/v1', // 加https
  113. // // target: 'https://lims-business-dev.steerinfo.com/v1', //加https
  114. // pathRewrite: {
  115. // '^/icore.icp.web/pass/mqtt/v1': '/'
  116. // }
  117. // },
  118. // "/icore.icp.web/pass/baseManagement/v1": {
  119. // target: "http://localhost:9002/v1", // 正式
  120. // // target: 'http://192.168.3.165:9002/v1', // 加https
  121. // // target: 'https://jclims.steerinfo.com/v1',
  122. // changeOrigin: true,
  123. // pathRewrite: {
  124. // "^/icore.icp.web/pass/baseManagement/v1": "/", // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  125. // // 比如我要调用'https://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  126. // },
  127. // },
  128. "/icore.icp.web/pass/baseManagement/v1": {
  129. target: "http://172.16.4.162", // 正式
  130. // target: 'http://localhost:9002/v1', // 正式
  131. // target: 'http://192.168.3.165:9002/v1', // 加https
  132. // target: 'https://jclims.steerinfo.com/v1',
  133. changeOrigin: true,
  134. },
  135. "/icore.icp.web/pass/systemBase/v1": {
  136. // target: 'http://168.168.45.55:9002/v1',
  137. // target: 'http://192.168.3.38:9004/v1',
  138. // target: 'http://168.168.44.214:9004/v1',
  139. // target: 'http://172.22.42.233:9004/v1',
  140. target: "http://172.16.4.162", //加http
  141. // target: 'http://localhost:9002/v1', //加http
  142. // target: 'http://192.168.3.113:9004/v1', //加http
  143. // target: 'http://168.168.44.214:9004/v1', //加http
  144. // target: 'http://jc1.steerinfo.com/v1', //加http
  145. changeOrigin: true,
  146. },
  147. "/weblib": {
  148. target: "http://172.22.42.2/",
  149. // target: 'http://172.22.4.2:9004/v1', //加http
  150. // target: 'http://jc1.steerinfo.com/v1', //加http
  151. changeOrigin: true,
  152. pathRewrite: {
  153. "^/weblib": "/", //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  154. // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  155. },
  156. },
  157. // 文件系统-上传下载
  158. "/icore.icp.web/pass/seaweedfs/v1/download": {
  159. target: "http://172.22.4.6:30888",
  160. // target: 'http://oss-filer.icore-oss.svc.cluster.local:8888', // 正式
  161. changeOrigin: true,
  162. pathRewrite: {
  163. "^/icore.icp.web/pass/seaweedfs/v1/download": "/", // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  164. // 比如我要调用'https://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  165. },
  166. },
  167. // 报表地址代理
  168. "/webroot/decision": {
  169. target: "http://172.22.4.5:8080/webroot/decision",
  170. changeOrigin: true,
  171. pathRewrite: {
  172. "^/webroot/decision": "/", // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  173. },
  174. },
  175. // 文件上传地址代理
  176. "/icore.icp.web/file": {
  177. target: "http://lims.jnmc.com",
  178. changeOrigin: true,
  179. pathRewrite: {
  180. "^/webroot/decision": "/", // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  181. },
  182. },
  183. // 文件上传地址代理
  184. "/icore.icp.web/oss-volume-0": {
  185. target: "http://lims.jnmc.com",
  186. changeOrigin: true,
  187. pathRewrite: {
  188. "^/webroot/decision": "/", // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  189. },
  190. },
  191. // 文件上传地址代理
  192. "/icore.icp.web/oss-volume-1": {
  193. target: "http://lims.jnmc.com",
  194. changeOrigin: true,
  195. pathRewrite: {
  196. "^/webroot/decision": "/", // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  197. },
  198. },
  199. // 文件上传地址代理
  200. "/icore.icp.web/oss-volume-2": {
  201. target: "http://lims.jnmc.com",
  202. changeOrigin: true,
  203. pathRewrite: {
  204. "^/webroot/decision": "/", // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  205. },
  206. },
  207. },
  208. // devModules: ['index', 'entrustedManagement','sampleManager','screeningTests', 'resourceManager']
  209. //devModules: ['reportForm', 'screeningTests', 'index', 'entrustedManagement','measurementDataManagement', 'approveManagement', 'testAnalysis', 'resourceManager', 'taskManagement']
  210. devModules: ["all"],
  211. // devModules:['index']
  212. // devModules: ["index", "entrustedManagement"],
  213. };