Sinet.WebProxy/Program.cs

16 lines
368 B
C#
Raw Normal View History

2023-08-29 14:49:21 +08:00
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();