/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/ReverseProxy.ConfigFilter.Sample/appsettings.json
58 строк
1 KB
Kahbazi
Change routes from array to object (#900)
08 апр 2021, 22:08
Не верифицирован
08 апр 2021, 22:08
344d968
Код
Авторство
О чём код?
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "AllowedHosts": "*", "Kestrel": { "Endpoints": { "https": { "Url": "https://localhost:5001" }, "http": { "Url": "http://localhost:5000" } } }, "ReverseProxy": { "Routes": { "route1": { "ClusterId": "cluster1", "Match": { "Methods": [ "GET", "POST" ], "Hosts": [ "localhost" ], "Path": "/api/{**catch-all}" } }, "route2": { "ClusterId": "cluster2", "Match": { "Path": "{**catch-all}" } } }, "Clusters": { "cluster1": { "Destinations": { "cluster1/destination1": { // Following value will be found by regex and looked up as an environment variable "Address": "{{contoso}}" }, "cluster1/destination2": { "Address": "https://bing.com/" } } }, "cluster2": { "Destinations": { "cluster2/destination1": { "Address": "https://example.com/" } } } } } }