Almost finish implementing client side

This commit is contained in:
2025-11-06 20:22:16 +02:00
parent a847779582
commit a891a686fd
42 changed files with 6450 additions and 57 deletions

View File

@@ -63,7 +63,8 @@ public class Program
BearerFormat = "jwt"
}));
});
builder.Services.AddCors();
builder.Services.AddIdentity<User, IdentityRole>()
.AddEntityFrameworkStores<ImgBoardContext>()
@@ -143,6 +144,13 @@ public class Program
app.UseAuthentication();
app.UseAuthorization();
app.UseCors(x => x
.AllowAnyMethod()
.AllowAnyHeader()
.SetIsOriginAllowed(origin => true) // allow any origin
//.WithOrigins("https://localhost:44351")); // Allow only this origin can also have multiple origins separated with comma
.AllowCredentials()); // allow credentials
app.MapControllers();
app.Run();
}