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