feat(api): CORS settings

This commit is contained in:
Mikhail Trubnikov
2023-12-11 09:23:19 +10:00
parent 681cfb600a
commit ff6be4966f
2 changed files with 5 additions and 1 deletions

View File

@@ -56,6 +56,8 @@ builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.InstallSwaggerService(builder.Configuration);
builder.Services.InstallCorsServices();
var app = builder.Build();
@@ -70,4 +72,6 @@ app.UseAuthorization();
app.MapControllers();
app.InstallCors(builder);
app.Run();

View File

@@ -29,7 +29,7 @@
},
"AllowedHosts": "*",
"CorsSettings": {
"AllowedHosts": "*"
"AllowedHosts": "http://localhost:4200; http://10.99.253.221:8083"
},
"StorageSettings": {
"StoragePath": "Data",