更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

-9
View File
@@ -8,18 +8,10 @@ import (
beego "github.com/beego/beego/v2/server/web"
)
// AcmeChallengeController 处理 Let's Encrypt 的 HTTP-01 验证回访。
//
// 路由:GET /.well-known/acme-challenge/:token
//
// 该路由在 routers/router.go 中无条件注册,不受 APP_MODE 影响——证书颁发机构
// 什么时候来验证与本服务以哪种模式启动无关。Nginx 扑底站点必须把这个路径按
// 明文 HTTP 反代过来,不能 301 跳转到 HTTPS(首次签发时还没有证书)。
type AcmeChallengeController struct {
beego.Controller
}
// Serve 返回 token 对应的 keyAuthorization(纯文本)
func (c *AcmeChallengeController) Serve() {
token := strings.TrimSpace(c.Ctx.Input.Param(":token"))
keyAuth, ok := services.GetHTTP01Challenge(token)
@@ -29,7 +21,6 @@ func (c *AcmeChallengeController) Serve() {
return
}
c.Ctx.Output.Header("Content-Type", "text/plain; charset=utf-8")
// challenge 是一次性的,不能被任何中间层缓存
c.Ctx.Output.Header("Cache-Control", "no-store")
_ = c.Ctx.Output.Body([]byte(keyAuth))
}