/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/BasicYarpSample/appsettings.json
57 строк
2 KB
MihaZupan
Fix standalone sample builds
23 апр 2021, 22:43
23 апр 2021, 22:43
94dd64e
Код
Авторство
О чём код?
{ // Base URLs the server listens on, must be configured independently of the routes below. // Can also be configured via Kestrel/Endpoints, see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints "Urls": "http://localhost:5000;https://localhost:5001", //Sets the Logging level for ASP.NET "Logging": { "LogLevel": { "Default": "Information", // Uncomment to hide diagnostic messages from runtime and proxy // "Microsoft": "Warning", // "Yarp" : "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "ReverseProxy": { // Routes tell the proxy which requests to forward "Routes": { "minimumroute": { // Matches anything and routes it to www.example.com "ClusterId": "minimumcluster", "Match": { "Path": "{**catch-all}" } }, "route2": { // matches /something/* and routes to 2 external addresses "ClusterId": "cluster2", "Match": { "Path": "/something/{*any}" } } }, // Clusters tell the proxy where and how to forward requests "Clusters": { "minimumcluster": { "Destinations": { "example.com": { "Address": "http://www.example.com/" } } }, "cluster2": { "Destinations": { "first_destination": { "Address": "https://contoso.com" }, "another_destination": { "Address": "https://bing.com" } }, "LoadBalancingPolicy": "PowerOfTwoChoices" } } } }