Skip to content

Commit e081259

Browse files
committed
added cors again
1 parent 9bd06a7 commit e081259

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Program.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{
1616
options.AddPolicy("AllowFrontend",
1717
policy => policy
18-
.WithOrigins("*")
18+
.WithOrigins("https://flowboard.azurewebsites.net")
1919
.AllowAnyHeader()
2020
.AllowAnyMethod()
2121
);
@@ -37,11 +37,12 @@
3737
app.MapOpenApi();
3838
}
3939

40-
app.UseHttpsRedirection();
4140

42-
// Use CORS policy - must be after UseHttpsRedirection and before UseAuthorization
41+
// Use CORS policy
4342
app.UseCors("AllowFrontend");
4443

44+
app.UseHttpsRedirection();
45+
4546
app.UseAuthorization();
4647

4748
app.MapControllers();

0 commit comments

Comments
 (0)