24 lines
494 B
C#
24 lines
494 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.UseCors(opts =>
|
|
opts.SetIsOriginAllowed(_ => true)
|
|
.WithExposedHeaders("*")
|
|
.WithHeaders()
|
|
.AllowCredentials()
|
|
.AllowAnyHeader()
|
|
.AllowAnyMethod()
|
|
);
|
|
|
|
app.MapControllers();
|
|
app.MapReverseProxy();
|
|
|
|
app.Run();
|