mirror of
				https://github.com/yangjian102621/geekai.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	fix: 修复阿里云短信发送失败的 bug
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user