Sinet.WebProxy/Program.cs

16 lines
368 B
C#

using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
var builder = WebApplication.CreateBuilder(args);
var reverseProxyConfig = builder.Configuration.GetSection("ReverseProxy");
builder.Services.AddReverseProxy().LoadFromConfig(reverseProxyConfig);
var app = builder.Build();
app.UseRouting();
app.MapReverseProxy();
app.Run();