diff --git a/PARR.API/Program.cs b/PARR.API/Program.cs index 3f13c1ec..81ea1bec 100644 --- a/PARR.API/Program.cs +++ b/PARR.API/Program.cs @@ -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(); diff --git a/PARR.API/appsettings.json b/PARR.API/appsettings.json index c507e05c..25bc4a0c 100644 --- a/PARR.API/appsettings.json +++ b/PARR.API/appsettings.json @@ -29,7 +29,7 @@ }, "AllowedHosts": "*", "CorsSettings": { - "AllowedHosts": "*" + "AllowedHosts": "http://localhost:4200; http://10.99.253.221:8083" }, "StorageSettings": { "StoragePath": "Data",