Skip to content

Commit 9b65c0c

Browse files
committed
feat: configuring yarp configuration
1 parent 339d575 commit 9b65c0c

File tree

1 file changed

+57
-85
lines changed

1 file changed

+57
-85
lines changed

src/Gateways/EvenTicket.Gateways.WebAPI/appsettings.json

Lines changed: 57 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -9,130 +9,102 @@
99
"ProxyProvider": "ReverseProxy",
1010
"ReverseProxy": {
1111
"Routes": {
12-
"catalog-route": {
13-
"ClusterId": "catalog-cluster",
12+
"eventcatalog-route": {
13+
"ClusterId": "eventcatalog-cluster",
1414
"Match": {
15-
"Path": "/api/category/{**catch-all}"
16-
}
15+
"Path": "/eventcatalog-service/{**catch-all}"
16+
},
17+
"Transforms": [
18+
{ "PathPattern": "{**catch-all}" }
19+
]
1720
},
18-
"event-route": {
19-
"ClusterId": "event-cluster",
21+
"shoppingbasket-route": {
22+
"ClusterId": "shoppingbasket-cluster",
2023
"Match": {
21-
"Path": "/api/event/{**catch-all}"
22-
}
24+
"Path": "/shoppingbasket-service/{**catch-all}"
25+
},
26+
"Transforms": [
27+
{ "PathPattern": "{**catch-all}" }
28+
]
29+
},
30+
"discount-route": {
31+
"ClusterId": "discount-cluster",
32+
"Match": {
33+
"Path": "/discount-service/{**catch-all}"
34+
},
35+
"Transforms": [
36+
{ "PathPattern": "{**catch-all}" }
37+
]
2338
},
2439
"ordering-route": {
2540
"ClusterId": "ordering-cluster",
2641
"RateLimiterPolicy": "fixed",
2742
"Match": {
2843
"Path": "/ordering-service/{**catch-all}"
2944
},
30-
"Transforms": [ { "PathPattern": "{**catch-all}" } ]
31-
},
32-
"service2-route": {
33-
"ClusterId": "service2-cluster",
34-
"Match": {
35-
"Path": "/service2/{**catch-all}"
36-
}
45+
"Transforms": [
46+
{ "PathPattern": "{**catch-all}" }
47+
]
3748
},
38-
"products": {
39-
"ClusterId": "Products",
49+
"payment-route": {
50+
"ClusterId": "payment-cluster",
4051
"Match": {
41-
"Path": "/api/products/{**remainder}"
42-
}
43-
},
44-
"files": {
45-
"ClusterId": "Files",
46-
"Match": {
47-
"Path": "/api/files/{**remainder}"
48-
}
49-
},
50-
"auditLogEntries": {
51-
"ClusterId": "AuditLogs",
52-
"Match": {
53-
"Path": "/api/auditLogEntries/{**remainder}"
54-
}
55-
},
56-
"users": {
57-
"ClusterId": "Users",
58-
"Match": {
59-
"Path": "/api/users/{**remainder}"
60-
}
61-
},
62-
"ConfigurationEntries": {
63-
"ClusterId": "Configurations",
64-
"Match": {
65-
"Path": "/api/ConfigurationEntries/{**remainder}"
66-
}
52+
"Path": "/payment-service/{**catch-all}"
53+
},
54+
"Transforms": [
55+
{ "PathPattern": "{**catch-all}" }
56+
]
6757
},
68-
"hubs": {
69-
"ClusterId": "Hubs",
58+
"externalpayment-route": {
59+
"ClusterId": "externalpayment-cluster",
7060
"Match": {
71-
"Path": "/hubs/{**remainder}"
72-
}
61+
"Path": "/externalpayment-service/{**catch-all}"
62+
},
63+
"Transforms": [
64+
{ "PathPattern": "{**catch-all}" }
65+
]
7366
}
7467
},
7568
"Clusters": {
76-
"catalog-cluster": {
69+
"eventcatalog-cluster": {
7770
"Destinations": {
78-
"catalog-destination": {
71+
"eventcatalog-destination": {
7972
"Address": "https://localhost:5050/"
8073
}
8174
}
8275
},
83-
"event-route": {
84-
"Destinations": {
85-
"event-destination": {
86-
"Address": "https://localhost:5050/"
87-
}
88-
}
89-
},
90-
"ordering-cluster": {
91-
"Destinations": {
92-
"ordering-destination": {
93-
"Address": "https://localhost:5053/"
94-
}
95-
}
96-
},
97-
"Products": {
76+
"shoppingbasket-cluster": {
9877
"Destinations": {
99-
"destination1": {
100-
"Address": "https://localhost:44328"
78+
"shoppingbasket-destination": {
79+
"Address": "https://localhost:5051/"
10180
}
10281
}
10382
},
104-
"Files": {
83+
"discount-cluster": {
10584
"Destinations": {
106-
"destination1": {
107-
"Address": "https://localhost:44345"
85+
"discount-destination": {
86+
"Address": "https://localhost:5052/"
10887
}
10988
}
11089
},
111-
"AuditLogs": {
112-
"Destinations": {
113-
"destination1": {
114-
"Address": "https://localhost:44378"
115-
}
116-
}
117-
},
118-
"Users": {
90+
"ordering-cluster": {
11991
"Destinations": {
120-
"destination1": {
121-
"Address": "https://localhost:44306"
92+
"ordering-destination": {
93+
"Address": "https://localhost:5053/"
12294
}
12395
}
12496
},
125-
"Configurations": {
97+
"payment-cluster": {
12698
"Destinations": {
127-
"destination1": {
128-
"Address": "https://localhost:44301"
99+
"payment-destination": {
100+
"Address": "https://localhost:5054/"
129101
}
130102
}
131103
},
132-
"Hubs": {
104+
"externalpayment-cluster": {
133105
"Destinations": {
134-
"destination1": {
135-
"Address": "https://localhost:44390"
106+
"externalpayment-destination": {
107+
"Address": "https://localhost:5055/"
136108
}
137109
}
138110
}

0 commit comments

Comments
 (0)