fix: 适配YARP路由配置格式

This commit is contained in:
2025-12-03 15:03:53 +08:00
parent 6b5da04751
commit 24e54886a1
2 changed files with 10 additions and 16 deletions

View File

@@ -3,23 +3,20 @@
"Enabled": false "Enabled": false
}, },
"ReverseProxy": { "ReverseProxy": {
"Routes": [ "Routes": {
{ "admin-route": {
"RouteId": "admin-route",
"ClusterId": "admin", "ClusterId": "admin",
"Match": { "Path": "/api/admin/{**catch-all}" } "Match": { "Path": "/api/admin/{**catch-all}" }
}, },
{ "mini-route": {
"RouteId": "mini-route",
"ClusterId": "mini", "ClusterId": "mini",
"Match": { "Path": "/api/mini/{**catch-all}" } "Match": { "Path": "/api/mini/{**catch-all}" }
}, },
{ "user-route": {
"RouteId": "user-route",
"ClusterId": "user", "ClusterId": "user",
"Match": { "Path": "/api/user/{**catch-all}" } "Match": { "Path": "/api/user/{**catch-all}" }
} }
], },
"Clusters": { "Clusters": {
"admin": { "admin": {
"Destinations": { "Destinations": {

View File

@@ -36,23 +36,20 @@
"OtlpEndpoint": "http://localhost:4317" "OtlpEndpoint": "http://localhost:4317"
}, },
"ReverseProxy": { "ReverseProxy": {
"Routes": [ "Routes": {
{ "admin-route": {
"RouteId": "admin-route",
"ClusterId": "admin", "ClusterId": "admin",
"Match": { "Path": "/api/admin/{**catch-all}" } "Match": { "Path": "/api/admin/{**catch-all}" }
}, },
{ "mini-route": {
"RouteId": "mini-route",
"ClusterId": "mini", "ClusterId": "mini",
"Match": { "Path": "/api/mini/{**catch-all}" } "Match": { "Path": "/api/mini/{**catch-all}" }
}, },
{ "user-route": {
"RouteId": "user-route",
"ClusterId": "user", "ClusterId": "user",
"Match": { "Path": "/api/user/{**catch-all}" } "Match": { "Path": "/api/user/{**catch-all}" }
} }
], },
"Clusters": { "Clusters": {
"admin": { "admin": {
"Destinations": { "Destinations": {