diff --git a/Program.cs b/Program.cs index 6029ca8..b109370 100644 --- a/Program.cs +++ b/Program.cs @@ -70,6 +70,16 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) }; }); +builder.Services.AddCors(options => +{ + options.AddDefaultPolicy(policy => + { + policy.AllowAnyOrigin() + .AllowAnyHeader() + .AllowAnyMethod(); + }); +}); + var app = builder.Build(); app.UseSwagger(); @@ -79,6 +89,7 @@ app.UseMiddleware(); app.UseAuthentication(); app.UseAuthorization(); +app.UseCors(); app.MapControllers(); app.Run(); \ No newline at end of file