mirror of
https://github.com/MAKS-IT-COM/maksit-certs-ui.git
synced 2026-05-16 04:48:12 +02:00
23 lines
514 B
C#
23 lines
514 B
C#
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
//builder.Services.AddDataProtection()
|
|
// .PersistKeysToFileSystem(new DirectoryInfo(@"/keys"))
|
|
// .SetApplicationName("YourAppName");
|
|
|
|
// Add YARP services
|
|
builder.Services.AddReverseProxy()
|
|
.LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"));
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
app.UseRouting();
|
|
|
|
// Use YARP reverse proxy
|
|
app.UseEndpoints(endpoints => {
|
|
endpoints.MapReverseProxy();
|
|
});
|
|
|
|
app.Run();
|