cors.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. <<<<<<< HEAD
  2. let url = 'http://172.16.4.162/icore.icp.web/pass'
  3. module.exports = {
  4. proxyTable: {
  5. '/icore.icp.web/pass/v1': {
  6. target: url + '/v1', //加http
  7. changeOrigin: true,
  8. pathRewrite: {
  9. '^/icore.icp.web/pass/v1': '/' //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  10. // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  11. }
  12. },
  13. '/icore.icp.web/pass/auth': {
  14. // target: 'http://172.22.4.6:20002/auth',
  15. //target: url + '/auth',
  16. //target: 'https://172.16.4.162/icore.icp.web/pass/auth',
  17. target: 'http://172.16.4.162/icore.icp.web/pass/auth',
  18. changeOrigin: true,
  19. pathRewrite: {
  20. '^/icore.icp.web/pass/auth': '/'
  21. }
  22. },
  23. '/icore.icp.web/pass/logout': {
  24. target: url + '/logout',
  25. changeOrigin: true,
  26. pathRewrite: {
  27. '^/icore.icp.web/pass/logout': '/'
  28. }
  29. },
  30. // '/icore.icp.web/pass/configCenter': {
  31. // target: 'http://dev-config.steerinfo.com/configCenter',
  32. // changeOrigin: true,
  33. // pathRewrite: {
  34. // '^/icore.icp.web/pass/configCenter': '/'
  35. // }
  36. // },
  37. '/icore.icp.web/restPassword': {
  38. target: url,
  39. changeOrigin: true,
  40. pathRewrite: {
  41. '^/icore.icp.web/restPassword': '/'
  42. }
  43. },
  44. // '/icore.icp.web/pass/serviceCenter': {
  45. // target: 'http://dev-govern.steerinfo.com',
  46. // changeOrigin: true,
  47. // pathRewrite: {
  48. // '^/icore.icp.web/pass/serviceCenter': '/'
  49. // }
  50. // },
  51. // '/icore.icp.web/pass/act': {
  52. // target: 'http://dev-act.steerinfo.com',
  53. // changeOrigin: true,
  54. // pathRewrite: {
  55. // '^/icore.icp.web/pass/act': '/'
  56. // }
  57. // },
  58. // '/icore.icp.web/pass/job': {
  59. // target: 'http://dev-job.steerinfo.com',
  60. // changeOrigin: true,
  61. // pathRewrite: {
  62. // '^/icore.icp.web/pass/job': '/'
  63. // }
  64. // },
  65. // '/icore.icp.web/pass/dd': {
  66. // target: 'http://dd.steerinfo.com',
  67. // changeOrigin: true,
  68. // pathRewrite: {
  69. // '^/icore.icp.web/pass/dd': '/'
  70. // }
  71. // },
  72. // '/icore.icp.web/pass/apiauth': {
  73. // target: 'http://auth.steerinfo.com',
  74. // changeOrigin: true,
  75. // pathRewrite: {
  76. // '^/icore.icp.web/pass/apiauth': '/'
  77. // }
  78. // },
  79. // '/icore.icp.web/pass/websocket': {
  80. // target: 'http://websocket.steerinfo.com/',
  81. // changeOrigin: true,
  82. // pathRewrite: {
  83. // '^/icore.icp.web/pass/websocket': '/'
  84. // }
  85. // },
  86. '/icore-api': {
  87. target: 'http://172.16.4.162/icore.icp.web/pass/',
  88. changeOrigin: true,
  89. pathRewrite: {
  90. '^/icore-api': '/'
  91. }
  92. },
  93. '/icore.icp.web/pass/testManagement/v1': {
  94. // target: 'http://172.22.4.6:9006/v1', // 加https
  95. // target: 'http://prod-lims-test/v1', //
  96. // target: 'http://localhost:9001/v1', //加http
  97. target: 'http://172.16.4.162', // 加https
  98. // target: 'https://lims-bnusiness-dev.steerinfo.com/v1', //加https
  99. changeOrigin: true
  100. },
  101. // '/icore.icp.web/pass/testManagement/v1': {
  102. // target: 'http://127.0.0.1:9001/v1', // 加https
  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', 'reportForm','workFlow', 'systemConfig', 'demo', 'taskManagement', 'batchManagement', 'programManagement', 'entrustedManagement', 'screeningTests','sampleManagement', 'sampleManager', 'samplePreparationTask','approveManagement','weightingManagement','testAnalysis','decideManagement','commodityInspection', 'exceptionManagement', 'certificateManagement', 'standardManagement', 'resourceManager']
  209. //devModules: ['reportForm', 'screeningTests', 'index', 'entrustedManagement','measurementDataManagement', 'approveManagement', 'testAnalysis', 'resourceManager', 'taskManagement']
  210. // devModules: ['all']
  211. // devModules:['index']
  212. devModules: ['index', 'approveManagement', 'entrustedManagement', 'resourceManager', 'systemConfig']
  213. }
  214. =======
  215. let url = 'http://172.16.4.162/icore.icp.web/pass'
  216. module.exports = {
  217. proxyTable: {
  218. '/icore.icp.web/pass/v1': {
  219. target: url + '/v1', //加http
  220. changeOrigin: true,
  221. pathRewrite: {
  222. '^/icore.icp.web/pass/v1': '/' //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  223. // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  224. }
  225. },
  226. '/icore.icp.web/pass/auth': {
  227. // target: 'http://172.22.4.6:20002/auth',
  228. //target: url + '/auth',
  229. //target: 'https://172.16.4.162/icore.icp.web/pass/auth',
  230. target: 'http://172.16.4.162/icore.icp.web/pass/auth',
  231. changeOrigin: true,
  232. pathRewrite: {
  233. '^/icore.icp.web/pass/auth': '/'
  234. }
  235. },
  236. '/icore.icp.web/pass/logout': {
  237. target: url + '/logout',
  238. changeOrigin: true,
  239. pathRewrite: {
  240. '^/icore.icp.web/pass/logout': '/'
  241. }
  242. },
  243. // '/icore.icp.web/pass/configCenter': {
  244. // target: 'http://dev-config.steerinfo.com/configCenter',
  245. // changeOrigin: true,
  246. // pathRewrite: {
  247. // '^/icore.icp.web/pass/configCenter': '/'
  248. // }
  249. // },
  250. '/icore.icp.web/restPassword': {
  251. target: url,
  252. changeOrigin: true,
  253. pathRewrite: {
  254. '^/icore.icp.web/restPassword': '/'
  255. }
  256. },
  257. // '/icore.icp.web/pass/serviceCenter': {
  258. // target: 'http://dev-govern.steerinfo.com',
  259. // changeOrigin: true,
  260. // pathRewrite: {
  261. // '^/icore.icp.web/pass/serviceCenter': '/'
  262. // }
  263. // },
  264. // '/icore.icp.web/pass/act': {
  265. // target: 'http://dev-act.steerinfo.com',
  266. // changeOrigin: true,
  267. // pathRewrite: {
  268. // '^/icore.icp.web/pass/act': '/'
  269. // }
  270. // },
  271. // '/icore.icp.web/pass/job': {
  272. // target: 'http://dev-job.steerinfo.com',
  273. // changeOrigin: true,
  274. // pathRewrite: {
  275. // '^/icore.icp.web/pass/job': '/'
  276. // }
  277. // },
  278. // '/icore.icp.web/pass/dd': {
  279. // target: 'http://dd.steerinfo.com',
  280. // changeOrigin: true,
  281. // pathRewrite: {
  282. // '^/icore.icp.web/pass/dd': '/'
  283. // }
  284. // },
  285. // '/icore.icp.web/pass/apiauth': {
  286. // target: 'http://auth.steerinfo.com',
  287. // changeOrigin: true,
  288. // pathRewrite: {
  289. // '^/icore.icp.web/pass/apiauth': '/'
  290. // }
  291. // },
  292. // '/icore.icp.web/pass/websocket': {
  293. // target: 'http://websocket.steerinfo.com/',
  294. // changeOrigin: true,
  295. // pathRewrite: {
  296. // '^/icore.icp.web/pass/websocket': '/'
  297. // }
  298. // },
  299. '/icore-api': {
  300. target: 'http://172.16.4.162/icore.icp.web/pass/',
  301. changeOrigin: true,
  302. pathRewrite: {
  303. '^/icore-api': '/'
  304. }
  305. },
  306. '/icore.icp.web/pass/testManagement/v1': {
  307. // target: 'http://172.22.4.6:9006/v1', // 加https
  308. // target: 'http://prod-lims-test/v1', //
  309. // target: 'http://localhost:9001/v1', //加http
  310. target: 'http://172.16.4.162', // 加https
  311. // target: 'https://lims-bnusiness-dev.steerinfo.com/v1', //加https
  312. changeOrigin: true
  313. },
  314. // '/icore.icp.web/pass/testManagement/v1': {
  315. // target: 'http://127.0.0.1:9001/v1', // 加https
  316. // changeOrigin: true,
  317. // pathRewrite: {
  318. // '^/icore.icp.web/pass/testManagement/v1': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  319. // // 比如我要调用'https://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/ 
  320. // }
  321. // },
  322. '/icore.icp.web/pass/mqtt/v1': {
  323. // target: 'http://172.22.4.6:9006/v1', // 加https
  324. // target: 'http://prod-lims-test/v1', // 加https
  325. target: 'http://172.16.4.162:9410/v1', // 加https
  326. // target: 'https://lims-business-dev.steerinfo.com/v1', //加https
  327. pathRewrite: {
  328. '^/icore.icp.web/pass/mqtt/v1': '/'
  329. }
  330. },
  331. // '/icore.icp.web/pass/baseManagement/v1': {
  332. // target: 'http://localhost:9002/v1', // 正式
  333. // // target: 'http://192.168.3.165:9002/v1', // 加https
  334. // // target: 'https://jclims.steerinfo.com/v1',
  335. // changeOrigin: true,
  336. // pathRewrite: {
  337. // '^/icore.icp.web/pass/baseManagement/v1': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  338. // // 比如我要调用'https://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  339. // }
  340. // },
  341. '/icore.icp.web/pass/baseManagement/v1': {
  342. target: 'http://172.16.4.162', // 正式
  343. // target: 'http://localhost:9002/v1', // 正式
  344. // target: 'http://192.168.3.165:9002/v1', // 加https
  345. // target: 'https://jclims.steerinfo.com/v1',
  346. changeOrigin: true
  347. },
  348. '/icore.icp.web/pass/systemBase/v1': {
  349. // target: 'http://168.168.45.55:9002/v1',
  350. // target: 'http://192.168.3.38:9004/v1',
  351. // target: 'http://168.168.44.214:9004/v1',
  352. // target: 'http://172.22.42.233:9004/v1',
  353. target: 'http://172.16.4.162', //加http
  354. // target: 'http://localhost:9002/v1', //加http
  355. // target: 'http://192.168.3.113:9004/v1', //加http
  356. // target: 'http://168.168.44.214:9004/v1', //加http
  357. // target: 'http://jc1.steerinfo.com/v1', //加http
  358. changeOrigin: true,
  359. },
  360. '/weblib': {
  361. target: 'http://172.22.42.2/',
  362. // target: 'http://172.22.4.2:9004/v1', //加http
  363. // target: 'http://jc1.steerinfo.com/v1', //加http
  364. changeOrigin: true,
  365. pathRewrite: {
  366. '^/weblib': '/' //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  367. // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  368. }
  369. },
  370. // 文件系统-上传下载
  371. '/icore.icp.web/pass/seaweedfs/v1/download': {
  372. target: 'http://172.22.4.6:30888',
  373. // target: 'http://oss-filer.icore-oss.svc.cluster.local:8888', // 正式
  374. changeOrigin: true,
  375. pathRewrite: {
  376. '^/icore.icp.web/pass/seaweedfs/v1/download': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  377. // 比如我要调用'https://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  378. }
  379. },
  380. // 报表地址代理
  381. '/webroot/decision': {
  382. target: 'http://172.22.4.5:8080/webroot/decision',
  383. changeOrigin: true,
  384. pathRewrite: {
  385. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  386. }
  387. },
  388. // 文件上传地址代理
  389. '/icore.icp.web/file': {
  390. target: 'http://lims.jnmc.com',
  391. changeOrigin: true,
  392. pathRewrite: {
  393. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  394. }
  395. },
  396. // 文件上传地址代理
  397. '/icore.icp.web/oss-volume-0': {
  398. target: 'http://lims.jnmc.com',
  399. changeOrigin: true,
  400. pathRewrite: {
  401. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  402. }
  403. },
  404. // 文件上传地址代理
  405. '/icore.icp.web/oss-volume-1': {
  406. target: 'http://lims.jnmc.com',
  407. changeOrigin: true,
  408. pathRewrite: {
  409. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  410. }
  411. },
  412. // 文件上传地址代理
  413. '/icore.icp.web/oss-volume-2': {
  414. target: 'http://lims.jnmc.com',
  415. changeOrigin: true,
  416. pathRewrite: {
  417. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  418. }
  419. }
  420. },
  421. // devModules: ['index', 'reportForm','workFlow', 'systemConfig', 'demo', 'taskManagement', 'batchManagement', 'programManagement', 'entrustedManagement', 'screeningTests','sampleManagement', 'sampleManager', 'samplePreparationTask','approveManagement','weightingManagement','testAnalysis','decideManagement','commodityInspection', 'exceptionManagement', 'certificateManagement', 'standardManagement', 'resourceManager']
  422. //devModules: ['reportForm', 'screeningTests', 'index', 'entrustedManagement','measurementDataManagement', 'approveManagement', 'testAnalysis', 'resourceManager', 'taskManagement']
  423. devModules: ['all']
  424. // devModules:['index']
  425. // devModules:['index','entrustedManagement','approveManagement','resourceManager']
  426. }
  427. >>>>>>> a1418f49b291dfc3325814c230cb6165b735ae2e