diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json index 924dbd44..f1417cac 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json @@ -22,89 +22,5 @@ }, "ElasticSearch": { "Url": "http://localhost:9200" - }, - "ReverseProxy": { - "Routes": { - "account-route": { - "ClusterId": "account-cluster", - "Match": { - "Path": "/api/account/{**everything}" - } - }, - "administration-route": { - "ClusterId": "administration-cluster", - "Match": { - "Path": "/api/abp/{**everything}" - } - }, - "catalog-route": { - "ClusterId": "catalog-cluster", - "Match": { - "Path": "/api/catalog/{**everything}" - } - }, - "basket-route": { - "ClusterId": "basket-cluster", - "Match": { - "Path": "/api/basket/{**everything}" - } - }, - "ordering-route": { - "ClusterId": "ordering-cluster", - "Match": { - "Path": "/api/ordering/{**everything}" - } - }, - "payment-route": { - "ClusterId": "payment-cluster", - "Match": { - "Path": "/api/payment/{**everything}" - } - } - }, - "Clusters": { - "account-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44330" - } - } - }, - "administration-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44353" - } - } - }, - "catalog-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44354" - } - } - }, - "basket-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44355" - } - } - }, - "ordering-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44356" - } - } - }, - "payment-cluster": { - "Destinations": { - "destination1": { - "Address": "https://localhost:44357" - } - } - } - } } } diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json new file mode 100644 index 00000000..7e3b617a --- /dev/null +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json @@ -0,0 +1,100 @@ +{ + "ReverseProxy": { + "Routes": { + "Account Service": { + "ClusterId": "account-cluster", + "Match": { + "Path": "/api/account/{**everything}" + } + }, + "Administration Service": { + "ClusterId": "administration-cluster", + "Match": { + "Path": "/api/abp/{**everything}" + } + }, + "Catalog Service": { + "ClusterId": "catalog-cluster", + "Match": { + "Path": "/api/catalog/{**everything}" + } + }, + "Basket Service": { + "ClusterId": "basket-cluster", + "Match": { + "Path": "/api/basket/{**everything}" + } + }, + "Ordering Service": { + "ClusterId": "ordering-cluster", + "Match": { + "Path": "/api/ordering/{**everything}" + } + }, + "Payment Service": { + "ClusterId": "payment-cluster", + "Match": { + "Path": "/api/payment/{**everything}" + } + }, + "product-picture-route": { + "ClusterId": "product-picture-cluster", + "Match": { + "Path": "/product-images/{**everything}", + "Methods" : [ "GET" ] + } + } + }, + "Clusters": { + "account-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44330" + } + } + }, + "administration-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44353" + } + } + }, + "catalog-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44354" + } + } + }, + "product-picture-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44354" + } + } + }, + "basket-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44355" + } + } + }, + "ordering-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44356" + } + } + }, + "payment-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44357" + } + } + } + } + } +} \ No newline at end of file diff --git a/gateways/web/src/EShopOnAbp.WebGateway/yarp.json b/gateways/web/src/EShopOnAbp.WebGateway/yarp.json new file mode 100644 index 00000000..424e598e --- /dev/null +++ b/gateways/web/src/EShopOnAbp.WebGateway/yarp.json @@ -0,0 +1,86 @@ +{ + "ReverseProxy": { + "Routes": { + "Account Service": { + "ClusterId": "account-cluster", + "Match": { + "Path": "/api/account/{**everything}" + } + }, + "Identity Service": { + "ClusterId": "identity-cluster", + "Match": { + "Path": "/api/identity/{**everything}" + } + }, + "Administration Service": { + "ClusterId": "administration-cluster", + "Match": { + "Path": "/api/abp/{**everything}" + } + }, + "feature-management-route": { + "ClusterId": "feature-management-cluster", + "Match": { + "Path": "/api/feature-management/{**everything}" + } + }, + "permission-management-route": { + "ClusterId": "permission-management-cluster", + "Match": { + "Path": "/api/permission-management/{**everything}" + } + }, + "setting-management-route": { + "ClusterId": "setting-management-cluster", + "Match": { + "Path": "/api/setting-management/{**everything}" + } + } + }, + "Clusters": { + "account-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44330" + } + } + }, + "identity-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44351" + } + } + }, + "administration-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44353" + } + } + }, + "feature-management-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44353" + } + } + }, + "permission-management-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44353" + } + } + }, + "setting-management-cluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44353" + } + } + } + } + } +} \ No newline at end of file