Skip to content

Commit

Permalink
temp disable cors
Browse files Browse the repository at this point in the history
  • Loading branch information
dopoto committed Jul 21, 2024
1 parent e28d579 commit 1c4c3a3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Add services to the container.

builder.Services.AddSignalR();
builder.Services.AddCors();
//builder.Services.AddCors();
//builder.Services.AddControllers();
//// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
//builder.Services.AddEndpointsApiExplorer();
Expand All @@ -42,12 +42,12 @@

//app.Run();

app.UseCors(builder =>
{
builder.WithOrigins(origins: environmentSettings.AllowedCorsOrigins ?? []);
builder.AllowAnyHeader();
builder.AllowAnyMethod();
});
//app.UseCors(builder =>
//{
// builder.WithOrigins(origins: environmentSettings.AllowedCorsOrigins ?? []);
// builder.AllowAnyHeader();
// builder.AllowAnyMethod();
//});

app.UseHttpsRedirection();
app.UseRouting();
Expand Down

0 comments on commit 1c4c3a3

Please sign in to comment.