-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathsetupProxy.js
110 lines (109 loc) · 3.18 KB
/
setupProxy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
const { createProxyMiddleware } = require("http-proxy-middleware");
const createProxy = createProxyMiddleware({
//target: process.env.REACT_APP_PROXY_API || "https://uat.digit.org",
// target: process.env.REACT_APP_PROXY_API || "https://qa.digit.org",
target: process.env.REACT_APP_PROXY_API || "https://works-dev.digit.org",
changeOrigin: true,
secure: false,
});
const assetsProxy = createProxyMiddleware({
target: process.env.REACT_APP_PROXY_ASSETS || "https://works-dev.digit.org",
changeOrigin: true,
secure: false,
});
const mdmsProxy = createProxyMiddleware({
target: process.env.REACT_APP_PROXY_ASSETS || "http://localhost:8080",
changeOrigin: true,
secure: false,
});
module.exports = function (app) {
["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy));
[
"/access/v1/actions/mdms",
"/egov-mdms-service",
"/mdms-v2",
"/egov-idgen",
"/egov-location",
"/localization",
"/egov-workflow-v2",
"/pgr-services",
"/filestore",
"/egov-hrms",
"/user-otp",
"/user",
"/fsm",
"/billing-service",
"/collection-services",
"/pdf-service",
"/pg-service",
"/vehicle",
"/vendor",
"/property-services",
"/fsm-calculator/v1/billingSlab/_search",
"/pt-calculator-v2",
"/dashboard-analytics",
"/echallan-services",
"/egov-searcher/bill-genie/mcollectbills/_get",
"/egov-searcher/bill-genie/billswithaddranduser/_get",
"/egov-searcher/bill-genie/waterbills/_get",
"/egov-searcher/bill-genie/seweragebills/_get",
"/egov-pdf/download/UC/mcollect-challan",
"/egov-hrms/employees/_count",
"/tl-services/v1/_create",
"/tl-services/v1/_search",
"/egov-url-shortening/shortener",
"/inbox/v1/_search",
"/inbox/v2/_search",
"/tl-services",
"/tl-calculator",
"/org-services",
"/edcr",
"/bpa-services",
"/noc-services",
"/egov-user-event",
"/egov-document-uploader",
"/egov-pdf",
"/egov-survey-services",
"/ws-services",
"/sw-services",
"/ws-calculator",
"/sw-calculator/",
"/egov-searcher",
"/report",
"/inbox/v1/dss/_search",
"/loi-service",
"/project/v1/",
"/estimate-service",
"/loi-service",
"/works-inbox-service/v2/_search",
"/egov-pdf/download/WORKSESTIMATE/estimatepdf",
"/muster-roll",
"/individual",
"/mdms-v2",
"/hcm-moz-impl",
"/project",
"/project/staff/v1/_search",
"/project/v1/_search",
"/facility/v1/_search",
"/product/v1/_search",
"/product/variant/v1/_search",
"/hcm-bff/bulk/_transform",
"/hcm-bff/hcm/_processmicroplan",
"/health-hrms",
"/project-factory",
"/boundary-service",
"/product",
"/plan-service",
"/health-project",
"/service-request",
"/census-service",
"/health-attendance/v1/_search",
"/health-individual/v1/_search",
"/health-muster-roll",
"/health-expense/bill/v1/_search",
"/health-expense-calculator/v1/_calculate",
"/filestore/v1/files/id"
].forEach((location) => app.use(location, createProxy));
["/pb-egov-assets"].forEach((location) => app.use(location, assetsProxy));
["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy));
};