mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Move CORS up
This commit is contained in:
@@ -25,6 +25,8 @@ public static class Program
|
|||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
app.UseCors("CorsPolicy");
|
||||||
|
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
@@ -32,8 +34,6 @@ public static class Program
|
|||||||
var database = app.Services.GetRequiredService<Database>();
|
var database = app.Services.GetRequiredService<Database>();
|
||||||
database.EnsureDatabase();
|
database.EnsureDatabase();
|
||||||
|
|
||||||
app.UseCors("CorsPolicy");
|
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user