Skip to content

Commit

Permalink
fix: cors policy permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
tdayko committed Jun 8, 2024
1 parent 11df0e6 commit e92aed5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/HigiaServer.API/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
};
});

builder.Services.AddCors(options => options.AddPolicy("CorsPolicy", cors =>
cors.AllowAnyHeader()
.AllowAnyMethod()
.AllowAnyOrigin()
));

var app = builder.Build();

app.UseCors(options => options
.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader()
);

app.UseHttpsRedirection();
app.AddAuthenticationEndpoint();
app.AddTaskEndpoint();
Expand All @@ -51,4 +51,4 @@
app.AddCustomErrors();
app.AddCustomSwagger();

app.Run();
app.Run();

0 comments on commit e92aed5

Please sign in to comment.