mirror of
https://github.com/Alvin-Zilverstand/school.git
synced 2026-11-29 17:47:50 +01:00
f
This commit is contained in:
1 parent
f3e79a7aeb
commit
d420c317ab
88 files changed
+36601
No files matched your search
@@ -0,0 +1,20 @@
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
// CORS (nodig voor frontend)
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("AllowAll",
|
||||
policy => policy.AllowAnyOrigin()
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod());
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseCors("AllowAll");
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
Reference in new issue
Block a user