/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/BasicYarpSample/Program.cs
20 строк
589 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; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); // Add the reverse proxy capability to the server builder.Services.AddReverseProxy() // Initialize the reverse proxy from the "ReverseProxy" section of configuration .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy")); var app = builder.Build(); // Register the reverse proxy routes app.MapReverseProxy(); app.Run();