mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 08:46:38 +08:00
fix: 修复阿里云短信发送失败的 bug
This commit is contained in:
parent
49646a79e5
commit
37222f07d9
@ -46,7 +46,7 @@ type CodeStats struct {
|
||||
// Token 生成自验证 token
|
||||
func (h *VerifyHandler) Token(c *gin.Context) {
|
||||
// 如果不是通过浏览器访问,则返回错误的 token
|
||||
if c.GetHeader("Sec-Invoke-Mode") != "cors" {
|
||||
if c.GetHeader("Sec-Fetch-Mode") != "cors" {
|
||||
token := fmt.Sprintf("%s:%d", utils.RandString(32), time.Now().Unix())
|
||||
encrypt, err := utils.AesEncrypt(h.App.Config.AesEncryptKey, []byte(token))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user