mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 18:40:55 +00:00
for issue #1530, fix incompatible bug
This commit is contained in:
parent
0b0904db13
commit
0c48738841
@ -64,6 +64,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
"github.com/astaxie/beego/cache"
|
"github.com/astaxie/beego/cache"
|
||||||
@ -78,7 +79,7 @@ var (
|
|||||||
const (
|
const (
|
||||||
// default captcha attributes
|
// default captcha attributes
|
||||||
challengeNums = 6
|
challengeNums = 6
|
||||||
expiration = 600
|
expiration = 600 * time.Second
|
||||||
fieldIDName = "captcha_id"
|
fieldIDName = "captcha_id"
|
||||||
fieldCaptchaName = "captcha"
|
fieldCaptchaName = "captcha"
|
||||||
cachePrefix = "captcha_"
|
cachePrefix = "captcha_"
|
||||||
@ -106,7 +107,7 @@ type Captcha struct {
|
|||||||
ChallengeNums int
|
ChallengeNums int
|
||||||
|
|
||||||
// captcha expiration seconds
|
// captcha expiration seconds
|
||||||
Expiration int64
|
Expiration time.Duration
|
||||||
|
|
||||||
// cache key prefix
|
// cache key prefix
|
||||||
CachePrefix string
|
CachePrefix string
|
||||||
|
Loading…
Reference in New Issue
Block a user