基于 SixLabors 实现验证码
添加登录页login.cshtml
在form表单加入验证码
添加帮助类VCode 生成验证码
添加 AccountController 中添加生成验证码方法
Dockerfile 中加入复制字体命令
添加 Sesssion支持
builder.Services.AddSession();
app.UseSession();
检查是否添加静态文件支持
app.UseStaticFiles();
正常发布dotnetcoreweb程序
publish 文件夹下面加入下载的字体文件comic.ttf
上传文件到linux环境之后在走docker发布即可
代码实现:https://github.com/Hedgehogcat/2023/tree/main/Admin/Hedgehogcat.Web.Admin
SixLabors : https://github.com/SixLabors/ImageSharp