cors.js 8.5 KB

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