Files
Swarm/DysonNetwork.Gateway/Program.cs
2025-07-20 16:35:18 +08:00

25 lines
520 B
C#

using DysonNetwork.Gateway.Startup;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddGateway(builder.Configuration);
builder.Services.AddControllers();
var app = builder.Build();
app.UseRequestTimeouts();
app.UseCors(opts =>
opts.SetIsOriginAllowed(_ => true)
.WithExposedHeaders("*")
.WithHeaders()
.AllowCredentials()
.AllowAnyHeader()
.AllowAnyMethod()
);
app.MapControllers();
app.MapReverseProxy();
app.Run();