feat: 注册流程强制图形验证码
SSR 注册页与 /api/register 共用 CaptchaService,防刷同时保留换一张无 JS 刷新。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -107,6 +107,7 @@ func Setup(cfg *config.Config) (*gin.Engine, error) {
|
||||
Mail: mailSvc,
|
||||
SitePage: sitePageSvc,
|
||||
Report: reportSvc,
|
||||
Captcha: captchaSvc,
|
||||
}, authMW)
|
||||
|
||||
r.GET("/media/thumb/*filepath", h.ServeImageThumb)
|
||||
@@ -114,6 +115,9 @@ func Setup(cfg *config.Config) (*gin.Engine, error) {
|
||||
r.GET("/health", h.APIHealth)
|
||||
r.GET("/robots.txt", h.RobotsTxt)
|
||||
r.GET("/sitemap.xml", h.SitemapXML)
|
||||
// 机器注册辅助(与 SSR 注册共用 CaptchaService)
|
||||
r.GET("/api/captcha", h.APICaptcha)
|
||||
r.POST("/api/register", h.APIRegister)
|
||||
|
||||
// OIDC Provider(外部机器 / Gitea SSO)
|
||||
r.GET("/.well-known/openid-configuration", h.OIDCDiscovery)
|
||||
|
||||
Reference in New Issue
Block a user