cors.js 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. // changeOrigin: true,
  103. // pathRewrite: {
  104. // '^/icore.icp.web/pass/testManagement/v1': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  105. // // 比如我要调用'https://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/ 
  106. // }
  107. // },
  108. // '/icore.icp.web/pass/mqtt/v1': {
  109. // // target: 'http://172.22.4.6:9006/v1', // 加https
  110. // // target: 'http://prod-lims-test/v1', // 加https
  111. // target: 'http://172.16.4.162:9410/v1', // 加https
  112. // // target: 'https://lims-business-dev.steerinfo.com/v1', //加https
  113. // pathRewrite: {
  114. // '^/icore.icp.web/pass/mqtt/v1': '/'
  115. // }
  116. // },
  117. // '/icore.icp.web/pass/baseManagement/v1': {
  118. // target: 'http://localhost:9002/v1', // 正式
  119. // // target: 'http://192.168.3.165:9002/v1', // 加https
  120. // // target: 'https://jclims.steerinfo.com/v1',
  121. // changeOrigin: true,
  122. // pathRewrite: {
  123. // '^/icore.icp.web/pass/baseManagement/v1': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  124. // // 比如我要调用'https://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  125. // }
  126. // },
  127. '/icore.icp.web/pass/baseManagement/v1': {
  128. target: 'http://172.16.4.162', // 正式
  129. // target: 'http://localhost:9002/v1', // 正式
  130. // target: 'http://192.168.3.165:9002/v1', // 加https
  131. // target: 'https://jclims.steerinfo.com/v1',
  132. changeOrigin: true
  133. },
  134. '/icore.icp.web/pass/systemBase/v1': {
  135. // target: 'http://168.168.45.55:9002/v1',
  136. // target: 'http://192.168.3.38:9004/v1',
  137. // target: 'http://168.168.44.214:9004/v1',
  138. // target: 'http://172.22.42.233:9004/v1',
  139. target: 'http://172.16.4.162', //加http
  140. // target: 'http://localhost:9002/v1', //加http
  141. // target: 'http://192.168.3.113:9004/v1', //加http
  142. // target: 'http://168.168.44.214:9004/v1', //加http
  143. // target: 'http://jc1.steerinfo.com/v1', //加http
  144. changeOrigin: true,
  145. },
  146. '/weblib': {
  147. target: 'http://172.22.42.2/',
  148. // target: 'http://172.22.4.2:9004/v1', //加http
  149. // target: 'http://jc1.steerinfo.com/v1', //加http
  150. changeOrigin: true,
  151. pathRewrite: {
  152. '^/weblib': '/' //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  153. // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  154. }
  155. },
  156. // 文件系统-上传下载
  157. '/icore.icp.web/pass/seaweedfs/v1/download': {
  158. target: 'http://172.22.4.6:30888',
  159. // target: 'http://oss-filer.icore-oss.svc.cluster.local:8888', // 正式
  160. changeOrigin: true,
  161. pathRewrite: {
  162. '^/icore.icp.web/pass/seaweedfs/v1/download': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  163. // 比如我要调用'https://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
  164. }
  165. },
  166. // 报表地址代理
  167. '/webroot/decision': {
  168. target: 'http://172.22.4.5:8080/webroot/decision',
  169. changeOrigin: true,
  170. pathRewrite: {
  171. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  172. }
  173. },
  174. // 文件上传地址代理
  175. '/icore.icp.web/file': {
  176. target: 'http://lims.jnmc.com',
  177. changeOrigin: true,
  178. pathRewrite: {
  179. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  180. }
  181. },
  182. // 文件上传地址代理
  183. '/icore.icp.web/oss-volume-0': {
  184. target: 'http://lims.jnmc.com',
  185. changeOrigin: true,
  186. pathRewrite: {
  187. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  188. }
  189. },
  190. // 文件上传地址代理
  191. '/icore.icp.web/oss-volume-1': {
  192. target: 'http://lims.jnmc.com',
  193. changeOrigin: true,
  194. pathRewrite: {
  195. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  196. }
  197. },
  198. // 文件上传地址代理
  199. '/icore.icp.web/oss-volume-2': {
  200. target: 'http://lims.jnmc.com',
  201. changeOrigin: true,
  202. pathRewrite: {
  203. '^/webroot/decision': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
  204. }
  205. }
  206. },
  207. // devModules: ['index', 'reportForm','workFlow', 'systemConfig', 'demo', 'taskManagement', 'batchManagement', 'programManagement', 'entrustedManagement', 'screeningTests','sampleManagement', 'sampleManager', 'samplePreparationTask','approveManagement','weightingManagement','testAnalysis','decideManagement','commodityInspection', 'exceptionManagement', 'certificateManagement', 'standardManagement', 'resourceManager']
  208. //devModules: ['reportForm', 'screeningTests', 'index', 'entrustedManagement','measurementDataManagement', 'approveManagement', 'testAnalysis', 'resourceManager', 'taskManagement']
  209. // devModules: ['all']
  210. // devModules:['index']
  211. devModules: ['index', 'approveManagement', 'entrustedManagement', 'resourceManager', 'systemConfig']
  212. }