diff --git a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Program.cs b/DamageAssesmentApi/DamageAssesment.Api.Surveys/Program.cs index 93545ae..eca1be6 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Program.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Surveys/Program.cs @@ -40,16 +40,20 @@ builder.Services.AddAuthentication(item => -builder.Services.AddCors(options => -{ - options.AddPolicy("DamageAppCorsPolicy", builder => - { - builder.WithOrigins("*") - .AllowAnyHeader() - .WithMethods("POST") // Allowing only the POST method - .AllowAnyOrigin(); - }); -}); +//builder.Services.AddCors(options => +//{ +// options.AddPolicy("DamageAppCorsPolicy", builder => +// { +// builder.WithOrigins("*") +// .AllowAnyHeader() +// .WithMethods("POST") // Allowing only the POST method +// .AllowAnyOrigin(); +// }); + +//}); +builder.Services.AddCors(p => p.AddPolicy("DamageAppCorsPolicy", build => { + build.WithOrigins("http://localhost:3000").AllowAnyMethod().AllowAnyHeader().AllowAnyOrigin(); +})); // Add controller services and API Explorer for endpoint discovery. builder.Services.AddControllers();