/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/ReverseProxy.ConfigFilter.Sample/Program.cs
19 строк
479 B
Chris Ross
Minimal APIs for docs and samples (#2327)
16 ноя 2023, 20:20
Не верифицирован
16 ноя 2023, 20:20
0e438fc
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using Yarp.Sample; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); builder.Services.AddReverseProxy() .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy")) .AddConfigFilter<CustomConfigFilter>(); var app = builder.Build(); app.MapReverseProxy(); app.Run();