Update for dns changes
This commit is contained in:
@@ -80,8 +80,10 @@ try
|
||||
builder.Services.AddControllers()
|
||||
.AddJsonOptions(o => o.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()));
|
||||
|
||||
var corsOrigins = builder.Configuration.GetSection("Dashboard:CorsOrigins").Get<string[]>()
|
||||
?? ["http://localhost:5173"];
|
||||
builder.Services.AddCors(o => o.AddPolicy("Dashboard", p =>
|
||||
p.WithOrigins("http://localhost:5173").AllowAnyHeader().AllowAnyMethod()));
|
||||
p.WithOrigins(corsOrigins).AllowAnyHeader().AllowAnyMethod()));
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
"CentralApi": {
|
||||
"BaseUrl": "http://localhost:5270"
|
||||
},
|
||||
"Dashboard": {
|
||||
"CorsOrigins": [ "http://localhost:5173" ]
|
||||
},
|
||||
"Gateway": {
|
||||
"GatewayId": "22222222-2222-2222-2222-222222222222",
|
||||
"SiteId": "11111111-1111-1111-1111-111111111111",
|
||||
|
||||
Reference in New Issue
Block a user